See also

"The Way the Cookie Crumbles", an episode of The Cleveland Show That's the Way the Cookie Crumbles, a 1979 film Bruce Almighty, in which reporter Bruce Nolan usually signs off with "and that's the way the cookie crumbles"

The origin of this expression is unknown but it has been in use since at least the 1950s. It is a variant on the expression "that's the way the boerewors bends". "That's the way the boerewors bends" appears to have originated in the 18th century