They were developed in chat rooms where people couldn't write using the Arabic alphabet, so they had to type in English transliteration and come up with ways to represent the Arabic letters that don't exist in English.
ء = 2 | ح = 7 | ظ = 6' |
ع = 3 | خ = 5 or 7' | ص = 9 |
غ = 3' or gh | ط = 6 | ض = 9' |