It’s not really a way to show that they’re “dressed up” or a way to show formality. It’s more a way of showing respect and dignity in certain situations——eg., if a particular job requires it or a social setting——at a funeral for example. A man, for example, should not wear a t-shirt or an open shirt when he works in a bank or if attends a funeral. To do so would be to show disrespect to his clients or to the family of the dead person. It also shows that the man takes the time to tend to his appearance, and not to look to casually or as if he “doesn’t care.”