Again, this is correct behavior of the tax authority,︀ there are rules and you must know the rules. Basically your friend did two things︁ wrong:
1) didn't exit his country properly -> every country has a different process but︂ you must flag yourself as non resident, losing some rights, like free healthcare
2) didn't︃ check DTA between his country and UAE
Since he didn't do number 1, even with︄ a TRC the tax authority could potentially say that you were still resident in the︅ country and thus you have to pay taxes. Usually under a certain threshold, tax authorities︆ don't proceed, but that varies by country,