So if the purpose of the synths were to replace humans by being better than them, what's the point of them still having all the basic needs of a human? If they're robots, why do the still need to eat or sleep or drink. Why are they no more powerful than humans? What's the point of synths at all?
Yeah, but still... why?
Why do they need to spy on wastelanders in their shitty shanty towns? No one can get in or out of their little superbase without teleporting, so why do abovegrounders even matter to them? Clearly they want as little to do with them as possible.
If they needed raw materials, why not just send a dozen sentry bots out to flatten everything in a reclamation area and then teleport it back? I don't see why it was ever necessary to bother with synths when robotics were already so advanced.
Alright, this is gonna be long.
Institute Armies and Recruitment
They do send entire Gen 1 and Gen 2 armies out to the surface to flatten entire settlements for single components. Take a look at University Point, which I still think was so good in comparison to the rest of the game that whoever designed and wrote for the place is being wasted working at Bethesda. As observed in Fallout 3, reproduction isn't exactly of the highest degree in the Institute, so like with Doctor Li and that guy you have to recruit during the questline, they scout the surface for new recruits. As for why not sentry bots, well synths are from what I've seen less resource consuming to make, are much more versatile, and can be repurposed for more than just combat.
What the Institute wants from the surface, and what the synths were for
The entire point of the Institute questline was to prove that they never wanted to mess with the surface all along, as had originally been presumed by the wastelanders. They only teleport outside for these few reasons - to gather resources, recruits, and valuable pre-war components (as in Mass Fusion), and the Coursers exist to counter-attack anyone who interferes with the gathering. As an extension of that, they dot the entire wasteland with undercover agents so they can quickly get wind of upcoming threats and maybe, if lucky, overhear information on pre-war tech locations. The synths program is two-fold: it is to build a viable labour workforce for the Institute's future, and an investment into the field of surface espionage.
Underlying threat to the Institute
Finally, there is an access directly into the Institute. The Minutemen questline concerns Sturges finding a disused water outflow tunnel from the Institute that purports the only entrance into the Institute without teleportation. Considering how unguarded and isolated the entrance was, making sure it was never discovered was very much a mission they had to keep maintaining.
The Institute's goals and internal conficts
As for their overall goal, they've never really had one. Their small numbers yet differing opinions between each one gives them all the problem of all compromises, no direct solutions. They all argue how to take the Institute forward and never get anywhere. You were supposed to change that, starting from as soon as Father died, which conveniently marks the end of the game, so that Bethesda didn't have to write the hard parts.
After that, the synths were supposed to basically create a "lower-class" labour force and later (with Gen 3-4 intelligence) viable assistants to their research, I would presume. It's never really put clear why a child synth was created, other than for the Institute to flaunt their AI development skills between themselves. Maybe it was just so that you could have a happy ending with the Shaun you spend the whole game looking for.
The Institute are just a bunch of scientists who have no idea what's going on with the surface. The people dying at the hands of their synths are all a game to them. The Institute (which I presume was supposed to be significantly larger than was shown in-game) just wants to build a society underground, and the damage they cause to get there (gathering, counter-attacks) doesn't matter to them because, ironic to Bethesda's take on Fallout, they can't comprehend consequences.
The Railroad, their mission and why they exist
Now, for the Railroad. The Railroad I would presume was originally founded to free normal slaves. An organisation aimed at using guerilla tactics to maintain freedom and human rights in a world gone mad. They discover the Institute, and guess what? A small band of scientists have, I would assume, several hundred thousands of slaves under their control. Rather than chip at the hundred of slavers on the surface, bringing the Institute down would restore order to the Commonwealth (the Institute's surface gather teams and Coursers would no longer be destroying everything), and as a result the raiders would be less likely to dot the landscape and therefore, less slavers. Hitting the Institute was the most efficient way of using the Railroad members and resources.
Conclusion
Conclusion? Synths were a labour force. A man-made working class. The Railroad, working by the logic that they are all human, aims to free hundreds of thousands "human" slaves. Many Gen 3s, originally developed to mimick humans so that they could think and work with human efficiency and precision and therefore be better labourers and work assistants, and the synths the Railroad mainly aimed to rescue, were repurposed to be counter-intelligence to the Railroad, who were bothering their resource gathering directly.
Why the presentation of the lore was badly executed
If it seemed iffy to you during your playthrough of Fallout 4, it's because the writing doesn't connect the dots really well. The information available is all over the place, and even when put together that most of the plot is just taken from various books, movies and games in the past that have already done the themes better. The original idea was sound and a good spin on the standard post-apocalypse. A lack of connection between each "lore point" and an overall inefficiently paced plot is what ultimately ruined Fallout 4's story. But the frame for what could have been is there, in Fallout 4, it just takes a bit of work to notice that the potential exists.
Any questions?
