My take: he loved Otohiko, who was in love with Daigo. So he maintained this physical relationship with Otohiko throughout the years, and Otohiko did the same because Masaki would always accept him. Two tragic stories, two men with an unrequited love.
AHHHHHHHHHhhhhHhhhhHHhhhhHHHhhhhHhhhhhhhHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!