How are favorite foods determined in Miitopia?

From all theories tested, it seems the id theory is the most valid one (pretty random) :

The food preferences are tied to an internal ID code unique to a Mii, and the Mii Maker and Tomodachi Life versions of the same Mii may have different IDs.

This means it does not depend on the job and that if you scan it it will have the same preferences. This was discussed and tested here :

https://gamefaqs.gamespot.com/boards/195500-miitopia/75768968