Because of the goals of each of these roles, they need to be separated.
Sure, you can hire a single person who can do the job, but this person can only focus on a single area per sprint. Otherwise, you'd end up with half thought, half baked, just for spec compliance software.
The goals of development aren't purely just making a code work. In the frontend, it also has to have a meaningful and intuitive interface. Sometimes, they need to setup A/B tests to figure out which interface converts better. It is important to note that the work done by the Frontend is the gateway to the user - and users are unpredictable. That in it sense makes it complicated. Backend on the other hand has to think about performance, scalability, and availability. They would have to plan for surges in traffic and make sure the services don't crash when these things happen.
A full stack developer (which I've always had a pet peeve on) is not a person who can do "everything". It is a person who can CODE front and back end, but not necessarily make them efficient.