In order to prepare a meal, you need to be able to afford ingredients, have the required skills, and have the time/energy to cook. So yes, it is cheaper to prepare your own meal, but if for example you’re working three jobs to make rent while raising a child, you’re going to have difficulty finding the time or energy required for cooking. Doubly true if you don’t already know how to cook.
There’s also people without access to a kitchen. If you have to rely on other people to cook for you, you’re extremely limited in options and as a result you’ll likely have to spend more money on fast food and takeout.
Another thing to think about: it’s cheaper to grow your own food than to buy it. Most of us don’t grow our own food - probably because we lack time, knowledge, or land.