That's the way the cookie crumbles.
就像小甜饼那样碎了。(小甜饼本来就会碎。)
Explaination: 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.
就时候事情就象你想像的那样发展,然后坏事发生,你没有办法去阻止他,所以你并不值得为此沮丧。