In the United States, it is illegal to discriminate against a person over 40 because of their age. Sometimes this comes up when a young, new boss says he wants to get rid of all those “old farts” and “bring in some new blood.” Other times, an older worker is fired so the company can replace him with someone who is younger and quicker at the same task.
Most often, though, the reason age discrimination occurs is less straightforward – it is not actually the employee's age that puts him in the cross-hairs, but his experience. More senior workers with more experience frequently make higher salaries than younger, less experienced competitors. In a tight economy, companies looking to save money might be tempted to axe old-timers and replace them with much less expensive, new workers.
This is often a poor idea for the company because it is losing the value of significant experience, know-how, and maturity. But it is not just a bad idea – it can actually be illegal.