Why do cats need special cat food?



I am just wondering why do people feed cat, cat food that they buy from the store? My nana has two cats and they eat rice, pasta and other food that she cooks. They like fish and they drink milk too! My nana never buy them any cat food. So now, I am thinking of getting a cat, a nice black and white cat! And I am confused. Do I need to buy them special cat food or can I just give my cats food that I cook myself? Thanks.