When you look at the dictionary meaning of 安 in Japanese, you can see that while it does mean cheap (安い/やすい) it can also mean peaceful. I'd also like to note that many Japanese words have two readings, a kun-yomi reading and an on-yomi reading. Kun readings are generally used in Japanese words for their reading alone, while on readings are used for borrowed Chinese meanings or words. 安 has a kun reading of やす and an on reading of あん.
You can see in some words that it retains its original meaning and reading: 安心 (あんしん) can mean relief, or peace of mind. 安定 (あんてい) can mean stability, and composure.
However, it seems that some Japanese words relating to peacefulness were read as "やす," in particular 安らか (peaceful) and 休まる (feel at ease). Here, 安 was chosen for its meaning, but its reading was ignored to accommodate the original Japanese reading
Judging from this, it is likely that since 安 was used in words where it was read as やす, it became generally associated with that reading. Therefore, when people sought to write "cheap," which was already read as "やすい," with kanji, they chose 安 based on its kun reading with little regard to the on reading or original meaning.