Apparently, pockets became a major thing a few years later, although it’s worth pointing out that pockets used to be more like reticules or pouches and they were invented thousands of years ago.
People just didn’t thrust their hands in their pockets in the 19th century, mostly because pockets didn’t really exist at that time.
They just weren’t commonplace during The Greatest Showman era.
Although Efron’s costume seemingly had pockets, which led to these exchanges, that detail really wasn’t right for the period, so they worked around it by keeping his hands out during filming.