It sounds like its from a movie, is it? I always use it sarcastically when someone is messing things up etc.
Sounds like a Mother talking to a child after child has destroyed something of value.
Goes back to time immemorial.
Lisa said it to Homer
When little Memkut accidently damaged his mother’s Isis statue while chasing a lizard around the hut.
One of the funnier uses, though definitely not the first, was in Jane Austen’s Mafia! (1998). Tony (Jay Mohr) is having an argument with Pepper (Pamila Gidley). She hurls a crystal bowl or something at him, it shatters, the argument continues, she hurls her poodle at him, it shatters, and Mohr says “This is why we can’t have nice things, Pepper!”