A convention is a common language. It is something you have the right to break when needed / suitable but which is otherwise nice to follow when interacting with others.
Such conventions allow you to omit the port when typing a URL in a browser for instance. They allow taking nice shortcuts and avoiding verbose / irrelevant technical details.
(now, some conventions are mandated by laws indeed. For instance, if you are setting up electricity somewhere, you'd better use the right colors. One might argue that we ought to call such things rules)
(In fact, not running SSH on port 22 is an industry best practice in 2024, sadly.)