God is a a God of mercy as well as a God of judgement. Also remember, OT times was for Israel, they were not in Christ yet..they were still learning.
Hosea was married to Gomer, he was not the one fornicating with her. She was unfaithful, he was faithful, He was heartbroken, she didnt care...