God hated it, and the kings of Israel / Judah went back and forth between destroying these alters and setting them up. The Commandment "Thou shalt have no other gods before me" is not a nebulous concept. The Lord knew that worshipping the other false deities lead to syncretism, where the devotees would worship others as equal to the Lord. This in turn led to Israelites bringing in outside cultures and incorporating their beliefs. Another thing the Lord detested.