Leaving the country as far as immigration is concerned means the date you pass through and the stamp reflects that even if legally you did not depart
Otherwise what if your flight is delayed or cancelled or you missed the boarding? Do they know that and call you back and charge you 300?
Years ago I did a visa run with a 3 hr turnround in SG, of course the flight was cancelled and I then missed my flight back from SG because I was still in JAk
I tried to suggest to the airline that since I had departed through immigration and left, I was happy just to arrive again and go back through immigration and land but they said no, you also have to physically leave, even though I was standing next to the door that led to the arrivals corridor, I said come on, no one will know just leave it unlocked for 5 seconds, I left, now I am back