Tummy upsets, including diarrhoea or food poisoning, are not on the agenda if you want to enjoy travelling or holidays. Having to spend hours on the toilet is at the very least exhausting, and the consequences could be much worse, including dysentery or hepatitis.
You are more than just a rubbernecking tourist. The curious traveller naturally wants to sample elements of the local way of life, especially the food. Howver, don't try to hard to emulate Bruce Parry (the famous explorer and TV presenter, who strives to live like the tribes he stays with).
If you travel in the third world, the local water and food should be ingested with care if you want to stay healthy. Bottled water and tinned food are usually safe but if you do try the local produce, be sure that it is clean, fresh and preferably well cooked.
Some travellers who have come away unscathed may pooh-pooh the risk. However,just because the proverbial bullet missed them, it doesn't mean that guns are safe. In any case, trying to live like the locals will not really make you understand how their lives are for them. Their lifestyles feel normal for them. You already know how they feel about it. They feel the same way that you do about your lifestyle.
Besides following the above advice, pack safe anti-diarrhoea medication, just in case.