the reason why the are spelled differently is because they 'sound' different.. you know.. they got the same meaning.. saying sa-ya , a-pa in malay is what we call 'bahasa baku' we don't use bahasa baku in our daily lives.. it's really hard actually to find someone who use it (bahasa baku) nowadays.. so most of the words that end with the vocal 'a' often mention as 'e' like.. saya, we pronounce as saye, (informal-not using bahasa baku)
same goes to apa,mana,ada and etc..