Because cooking has turned into something social somehow, people don’t want to be isolated in the kitchen any more.
But in the past, someone walking into the kitchen while you were cooking would probably have been akin to them walking in on you in the toilet (“What!? No, I don’t want them to see the dinner until it’s actually done!”).