Raw Value Enumerations

How to understand this code?

> enum TextAlignment: Int{
>     case left = 1
>     case right = 2
>     case center = 20
> }
> TextAlignment.left.rawValue
> let myRawValue = 20
> if let myAlignment = TextAlignment(rawValue: myRawValue){
>     print("successfully converted \(myRawValue) into a TextAlignment")
> }else{
>     print("\(myRawValue) has no corresponding TextAlignment case")
> }

And yes we successfully converted 20 into TextAlignment but i dont understand why we need this?
What do we get useful with this code?

You would have to do that sort of thing if you were to recreate TextAlignment objects from archive data.

I agree with you in the case there is no need of optional binding

59