They offer advice on club selection, know the course inside out so that they can tell the player the distance from any given point to the green, which way a ball is likely to swing when hit, they also organise transport, food etc and help with spotting errors that creep into a player's game. Basically they manage a pro golfer's tournament for them. They do a lot more than carry the clubs ..... a wheeled cart could do that bit.
Mostly the hideous outfits are worn for $$$$$ reward as they are provided by the sponsors.