That's one of those things people like to say. Esp to kids, which just made me discouraged and disheartened as a kid, and later just irritated and distrustful toward those who said it. I never figured out how it was supposed to help to say "life's not fair" esp when everyone by kindergarten already knows it. I eventually figured out it just wasn't a good answer to anything and people said it when they didn't know what else to say and especially when they were trying to justify not taking action (for example on bullies or something else actionable).
What was even more loopy to me is when a cranky adult snapped "life's not fair" (I guess they think they are giving an awesome, tough love life lesson or something?? Not sure) I couldn't help be feel that
I was being smart-mouthed. I, a kid, a good kid, too, who
right next door to never smart-mouthed the adults, being smart-mouthed by an adult. Who was supposed to be an authority figure. Unreal. Simply flabbergasting.