The article notes that the relationships were consensual. Like, do you think no one in prison would want to have sex? (The article could be misleading, but also there's presumably lots of consensual sex in prison, much as there is quite a bit of non-consensual sex).