There are house sharing arrangements in which sharing food is part of the package. One person shops, cooks, and/or cleans in exchange for rent.
However, for most other sharing housing arrangements, it is worth thinking carefully about whether or not you should try to share food. My bias is that each person should have their own food. By not sharing food, one potential source for conflict is removed. It’s a simple as that. No negotiations about shopping, money, who’s cooking, who’s cleaning and what time meals will be. No requirement to be home at a certain time or to inform of plans to be out of the house. I know that this doesn’t sound friendly – but it can be. There’s no reason resources can’t be pooled together if housemates are home together at meal time.