Because they're digestive systems aren't developed yet and are unable to break down anything but breastmilk or formula which is designed to mimic breastmilk.
There is an endless list as to why. For what example, the baby isn’t old enough to fully know how the swallowing motion works other than with milk. It’s easy for them to choke on it. they can have a reaction to the food and you wont know until it’s too late bcuz they are too young. Their stomachs are not developed to the point where they can digest it well it can mess up their system and upset their stomachs really bad....if you feed them this young then you may THINK they swallowed it all but you never know and they can choke in their sleep without you knowing. The list goes on. But those are some of the reasons as to why you shouldn’t give a baby food until 6 months old.