Green’s Dictionary of Slang

that’s the way it goes phr.

also that’s the way the shit goes

that is the way things work out and one must accept the facts, like it or not.

[US]H. Green Actors’ Boarding House (1906) 22: ‘That’s the way it goes!’ he thought, bitterly.
[US]E. Thompson Caldo Largo (1980) 53: Way it goes, compadre, Way it goes.
[US]S. King Stand (1990) 243: That’s just the way the shit went down.