Because age, unlike being of a particular race, gender, or sexuality, is something that all people experience and therefore it's commonplace to base how we judge or perceive a member of society based on that, a prominent and also justified example being the law.
I'm kind of sick of the "ok boomer" meme when it's used dismissively although boomers do tend to have a style of humor that younger people tend not to find funny and that is commonly evident in comic strips based on their content ("muh kids on their phones", "I hate my spouse"), and especially their drawing style. It was also partly spawned as a response to the dozens upon dozens of old journalists complaining about dumb things like why young people aren't as enticed by bougie things like
country clubs as much as they used to be.