Such is life
An acceptance of the unpredictable fortunes of existence, often spoken with an air of weary resignation.
The early uses of this phrase date from the mid 18th century. For example, Joseph Baretti's A Grammar of the Italian Language, 1762, translates "Cosi va'l mondo!" as "Such is life" and continues:
"Such is life, that whatever is proposed, it is much easier to find reasons for rejecting than embracing."
'Such is life', of course, mirrors the French 'C'est la vie', which equates to the English 'that's life', or 'life's like that'. Modern variants are 'that's the way it goes', 'that's the way the ball bounces', 'that's the way the cookie crumbles' etc.
Idioms: that's how the ball bounces
Also, that's the way the ball bounces or the cookie crumbles. That is the way matters have worked out and nothing can be done about it. For example, I'm sorry you got fired but that's how the ball bounces, or They wanted a baby girl but got a third boy--that's the way the cookie crumbles. These phrases allude to an odd bounce or a crumbled cookie that cannot be put back together. [Colloquial; mid-1900s]
way the cookie crumbles
Etymology - First attested 1957
That's the way the cookie crumbles
1. That is the way things happen; that's life.
* That's the way the ball bounces
* That's the way life is
* That's the way the mop flops
* That's the way the tail wags
something that you say which means that bad things sometimes happen and there is nothing you can do to prevent it, so it is not worth becoming upset about it.
I can't believe they chose Sam for the job and not me. Ah well, that's the way the cookie crumbles.