I'm sure that network X would not be offering free roaming on network Y without an agreement in place between carriers that made it free (or, at least, very cheap) to do so.
That very much depends on whether the traffic between the two networks is equal. If it's very asymmetric one side can take advantage of the situation. Also keep in mind that in some locations, free roaming is mandated by law so carriers have no choice but to offer it - in this case visited carriers can take advantage.