So I sided with the Railroad, declared war the BoS, killed my own son, nuked a bunch of morally shady scientists and their families and arguably set the recovery of humankind back 200 years and I feel pretty crappy about it to be honest. But the reason I did all this can be summed up in one word:
Curie
I hadn't been too interested in companions until I arrived at Vault 87 but I found robot Curie so endearing that I "adopted" her straight away. Having her accompany me made everything feel fresh again since everything was new to her eyes (and that voice didn't hurt either )
Once Curie became Synth Curie things just kind of progressed naturally and she and my character have inevitably ended up in a relationship.
This made my faction choice quite simple given that I never really clicked with the Minute Men. The BoS would kill Curie on site so they weren't an option and the Institute would consider her their property and condemn her to a life of servitude.
So the Railroad seemed like the only faction choice that would result in a commonwealth where Curie and my character could have a life together.
Did anyone else base their choices on their companions?
On a side note, I will say that I'm not exactly keen on the Railroad and I'd have much preferred to take over the institute and attempt to change their views but this is not an option in the current game.