At a distance follows Energon Mirage, who had the (unrequited) hots for Galvatron.
Most recently the IDW Generation 1 continuity ongoing series, More Than Meets The Eye, refers to a Transformer in a committed, intimate partnership as a "Conjunx Endura".
In issue #38 of this series, Brainstorm uses the term "sparkmate" when he addresses Rewind about his Conjunx Endura.
While a definitive answer to this has yet to be given, the question as to why Transformers become romantically involved with one another can be approached from a different angle. This is shown through their very human-like society, interpersonal interactions, familial relationships, and even the fairly common practice of merging bodies and minds.
If these are not frowned upon, then why should social connections of the romantic kind be regarded much differently, if at all?
Most commonly, Transformers stick to their own kind when becoming romantically entangled.