Designed primarily to block the sun's rays from ones eyes, people wear them for a variety of reasons.

1. To block the sun's rays, either to stop glare or protect from ultraviolet light.

2. Eyes give a large amount of information about a person. By looking at someone's eyes you can often determine their mood, where they are looking, if they are drugged, etc. If one wears sunglasses, they prevent people from gaining this information.

3. Many people wear sunglasses for style. In fact there are a number of people that buy sunglasses and never actually wear them over their eyes, instead preferring to shift them up over near their foreheads. This seems particularly common in California for some reason.