Not all freemasons were fezzes, only Shriners. The fez is worn at all Shriner' functions by members of the lodge to show their support and brotherhood. It is also worn at parades to gain exposure for the fraternity.