Why do fat people and thin people get hungry at the same time?
I am not sure your statement is true, fat and thin people may not always get hungry at the same time. You cannot simply compare these two categories as they contain subcategories including people "feeling hungry" because of disorders related to their mental health, physiology, diseases,...

The term you are looking for is "appetite regulation" and reading the wikipedia page will give you an overview of this subject and why your question is too broad to be answered. https://en.wikipedia.org/wiki/Appetite#Regulation