Ryou met Hayato after the wedding of his unrequited love and right after that they began a kind of sex friend relationship so both of them would be able to forget their unrequited loves and get over their broken hearts. While this was true for Ryou, it was not the same for Hayato.
A lovely story, to be honest.
Hajimari wa Subete Uso