The transfer is not that unusual.... a bit like connecting via the US, where you also need to go through immigration and recheck your luggage :-).
But yes, you will go through immigration and you will get a visa on arrival (for 24hrs) so you can leave the airport. If you book a stopover and continue on your (international) route you would also qualify for a 72hr visa on arrival...