Phonosemantic compound. 阝 represents the meaning and 可 represents the sound. Based on the original meaning "hillside". The current meaning is a phonetic loan.
阿 and 可 don't sound similar in modern Mandarin due to historical phonetic changes. They were more similar in older Chinese.阿 /*qˤa[j]/, /*ʔˤa (< *qˤaj)/ 可 /*[k]ʰˤa[j]ʔ/