It is really usefull you get for instance duplicates from the horizontal time stamps and so on because CTC uses blank characters (i.e. heelll[blank]llllloooo is the same as hellll[blank]lo would get encoded to hello but hello would not.).
The loss (CTCLoss) is computed as illustrated here (the blank labels are not removed for loss calculation): 
(https://miro.medium.com/max/1200/1*1_5KnLvaTkGUFoyat2jHcQ.png 1)
During inference, you get the prediction by best path decoding.