The entire of the Middle East operates on a principle of magnanimous hospitality. The Arabs call this karam, for example, which is considered to even be a religious obligation.
So if you're a stranger passing through a town and chat with some locals, you can expect for someone to invite you for tea and maybe even dinner!
Do you take them up on the offer?
Most people in the West would ask themselves "do I have the time", but a middle easterner would think "do they have the time?" Remember, you as a guest are also magnanimously hospitable--in this case, the least possible burden. Unfortunately, the guest must navigate whether they are being considerate or insulting by refusing hospitality.
Now to address taarof specifically. Persian's have pathologized hosptiality to the point of psychosis. The behavior is often mechanically choreographed (e.g. you should refuse at least twice before accepting a cucumber.) In other cases, it's insane.
Story time:
My mom and aunt had not seen each other for 3 years and met for lunch at a cafe. They went back and forth over who would pay at the register until it erupted into a fight. They sat at separate tables for lunch.
A close family friend--with no provocation from my sister--offered to house her for a weekend she was visiting. My sister accepted. That friend later complained to my mother.
A friend of mine went to a mechanic who offered to fix a small issue for free. My friend knowing better paid him anyway, but the mechanic was still upset since he didn't pay enough!
Edit: Just to address some of the comments. Abroad, the degree of hospitality is warped for foreigners (for what I hope are obvious reasons). Middle easterners in the West are far more inclusive.