Not every springer has a top hat, and some work well without one, so although they might not be as essential as a spring guide, they are helpful for promoting efficiency.
The top hat should ideally be freely rotating inside the piston, but with no side to side movement across the piston diameter. The top hat should also be a nice snug fit on the spring.
This allows for the spring to freely rotate as it is compressed when cocking, and then rotate again as the spring is uncompressed after the trigger is released, but without allowing the spring end to move from side to side within the piston thus reducing spring twang.
If the top hat does cannot rotate around the piston rod, the spring face will have to rotate around the surface of the top hat, which will cause some drop in efficiency, possibly cause some premature wear to the face of the top hat, and reduce spring life by putting avoidable strain on the spring.