Basketball and hockey coaches wear business suits on the sidelines. Football coaches wear team-branded shirts and jackets and often ill-fitting pleated khakis. Baseball managers are the only ones who wear the same outfit as their players.
It goes back to the earliest days of the game, when the person known as the manager was the business manager, the guy who kept the books in order and the road trips on schedule.
The person we call the manager today, who arranges the roster and decides when to pull a pitcher, was known as the captain. He was usually also on the team as a player. There were also a few captains who didn’t play for the team and stuck to making decisions in the dugout, and they usually wore suits. With the passing of time, it became less common for the captain to play and on most teams they had strictly managerial roles. The rules do not state that a manager should wear a uniform or not.