Actually, I know this just got marked as answered, but since all rules sources state the same and this simple fact seems to have been mentioned in the previous answer's comments, I am posting my own answer.
In some cases, you may have to squeeze into or through an area that isn’t as wide as the space you take up.
This simple sentence actually states that when the conditions in place may force you to squeeze you may do it using this rule. The fact that it is written with "have to" removes any choice on the player's side. Also, looking at the phb glossary, the word space is defined as such
The amount of floor space a creature requires to fight effectively, expressed as one dimension of a square area (for
example, a creature with a space of 10 feet occupies a 10-foot-by-10-foot area on the battle grid).
Floor space required to fight effectively (which means without penalty everywhere in the combat rules) for that creature, indicates that it's the floor area that determines if a creature squeeze or not and I am not sure how a player can choose how big is a floor in a room either.
With all my points above it can't be ruled out that a player can decide when or where to squeeze and squeeze is the only rule that allows you to move in/through a space smaller than your space (floor space not as big as the creature entry's space that is)
I hope my points and answer are clear to the reader, if not please comment so I can fix it.