Why do goalies wear different uniforms?
It is an amendment to the existing set of original rules that goal keepers have to wear the clothes that are different from the clothes worn by his teammates. This is done to make the goal keeper visualized separately on the field from others. The goal keeper is unique individual in the team as he can make use of his hands while playing. If the goal keeper does not have a different colored dress then the match referee will not be able to identify the person who is holding the ball inside the net.
In the earlier days, when football was introduced and evolving, the different teams used to wear different colors but not the goal keeper wearing different color. The goal keeper was just looking different with his cap that is unique from all other team mates. But, Scottish goal keepers were known to be wearing entire clothing different from the team members even in earlier days. The same colored clothes worn by the goal keeper would create a lot of confusion.
During a corner kick, there will be many players standing inside the goal stand. To distinguish the goal keeper from the other players, the different colored clothes for him will help. If the ball is touched by any of the players other than goal keeper then there will be a penalty kick announced. If any person other than goal keeper was involved in touching the ball it can be easily noticed if the clothes of the team members are different from that of goal keeper.
If the goal keeper has different dress color compared to other team members, the team member who is wearing the other color will be identified easily if he holds the ball in his hand. The different dress color to the goal keeper is mainly for the referee, other team members and audiences to identify who has the ball in his hands and is it right for him to have it as per the rules.