In the 1960s, a popular slogan of young people was "Don't trust anyone over 30." Unfortunately, many of the same people who uttered these words back in the day are seeing this attitude being used against them in the form of age discrimination in the workplace.
You were just fired or demoted, but it doesn't seem fair. After all, it makes sense to get fired for stealing money from the company or intentionally lighting the office building on fire, but what if you didn't do anything wrong? What if you were let go because your boss didn't like the color of your tie, or the baseball team you follow, or the pictures of your dog you posted online? Is that legal?