Wheeljack was very possibly a gift from Primus to Ratchet.
They literally bumped into each other outside of the Medical Bay. Ratchet had been leaving from his shift to go to the commissary and Wheeljack heading in, one hand cupped to his chest and holding four of the chopped off digits of his other hand.
Wheeljack had apologized profusely for smearing energon all over Ratchet’s chest. The stumps of his fingers had been bleeding freely and knowing Hoist was still in surgery, Ratchet had promptly steered Wheeljack to the nearest open table and had done the repair himself.
It had only taken about three minutes for Ratchet to be laughing so hard that he soldered Wheeljack’s pinkie finger on backwards and had to do it again. Wheeljack had been funny and engaging, somehow easily drawing Ratchet into conversation. By the end of Wheeljack’s visit, Ratchet had felt like he had known the other mech forever.
After that, they continually encountered each other around the base. They started having meals together and chatted about anything from Ratchet’s medical cases to Wheeljack’s inventions. Gradually, Ratchet found himself only thinking about the twins when he was lying in his berth, trying to recharge.
Even that faded a little when Wheeljack’s roommate was killed during a battle. Ratchet hadn’t even thought about his reply when Wheeljack had asked Ratchet if he wanted to move in. They meshed together as roommates perfectly, surprisingly getting along together in closed spaces.
Their relationship felt right; homey and safe. It was almost a natural progression for the two of them to interface. Only that didn’t feel right. It was awkward and weird and Ratchet kept thinking about Sideswipe’s smile or Sunstreaker’s optics. Before Ratchet’s panels had even popped, he ended up shaking in Wheeljack’s arms, telling him of the first time he had met the twins, about the last time with Sideswipe’s kiss.
And Wheeljack had taken it all in stride, laughing off Ratchet’s apologies and asking questions about Sideswipe and Sunstreaker. If anything, Ratchet’s and Wheeljack’s relationship grew even stronger after that. They told each other everything and even though they never interfaced again after that one disastrous attempt, they often recharged together in the same berth.
Ratchet often found himself thinking about how lucky he was. Wheeljack had come into his life when he had needed someone more than ever. If the two of them hadn’t ever met, Ratchet would have likely spiraled down further and further into despair. But somehow, they had met, had become friends, and one day Ratchet thought they might even become amica.
Somewhere along the way, Ratchet must have done something important enough for Primus to take notice and reward him.