"th" sounds in loanwords



I was wondering about how different languages treat "th" sounds and
why.

I have read that "muezzin" and "Ramadan" are properly "mueððin" and
"Ramaðan". So why do we have the versions we do? We retain "th" in
words such as "theory" and "thermal".

Once, out of curiosity, I looked up the Icelandic word for methane. No
thorn: IIRC, it was "metan". I don't get it.

.