Yeah, it makes really no sense even for native speaker when you think about it, people just accept this nonsense, in English it's either how many minutes past some time, or how many minutes to next hour, but in Czech/Slovak you talk "on hour", not sure what's origin of this nonsense, but I doubt majority of people could explain the meaning.
We also commonly use double negative:
English - I did nothing
Slovak/Czech - I didn't do nothing (reverse I did everything)
People don't think about it, just accept this nonsense and go on with it.
Czech language has even way more illogical things than Slovak, since it is older, for instance they have special letter ů which sounds exactly same as ú (as oo in Doom), but ů can't be used as first letter of word, where you must use ú and vice versa, if it's not first letter must use ů and can't use ú, despite both of them having exactly same meaning/sound.