I understand when the various types of pitchers come on: starter, middle reliever, setup, closer. But if the starter was good enough for 6 innings, why not similarly have one pitcher pitch all the remaining innings? On the flip side, if the closer is so good a shutting down an innings, why not use him more?
Bullpen specialization is a relatively new phenomenon. And there are a ton of factors that come into play, but I'm going to keep it simple here.
First and foremost, almost ever pitcher is more effective if he pitches fewer innings in an outing, if he pitches fewer days of the week, and if he throws fewer pitches when he does pitch. It's important to also note that this is the rule and that many many exceptions exist.
It's also important to know that there are only so many guys in the league who can go through the same batting order 3 times and not give up a ton of hard hit balls the third time through the order. That means that for many starting pitchers their maximum efficacy is 6 innings. There is even a stat for this, it's called the Quality Start, that's when you go at least 6 and give up fewer than 4 earned runs.
So that's why we have starters and relievers. Now, why do relievers have specific jobs in the bullpen?
Mostly because most pitchers are really effective at one thing. Left handed relievers are super useful because a lot of the best power hitters are left handed and it's hard for lefties to hit off of left handed pitchers.
Closers are usually your best reliever, would he be a good starter? Maybe? But a lot of the best closers are guys who started for a while and got hurt and needed to pitch shorter duration outings (see John Smoltz), or really young guys who can't yet handle the innings load of a starter's schedule (see Aroldis Chapman, though he's stuck at closer for a while now).
Most of your relievers are guys who were drafted as starters and washed out in the minors from starting roles because they couldn't cut it. Heck a lot of guys who pitch in relief even started in the majors for a while before being replaced by someone who is better at it.
The fact is that there are only so many guys who can handle pitching even multiple innings at the major league level. Look at the rotation of your favorite team. How much better than the second or third best reliever is the 4th starter? It's pretty stark, if you asked that reliever to stretch out and start, he'd fare much worse.
So why not change it up and let one guy pitch the last three innings of a start? This is actually something you see in the minors, and is also something you'll sometimes see in the majors in September when rosters expand and teams are trying to get their young guys extra innings to see what they have before they have to make roster decisions in the off season.
However, the problem is, with a normal roster, if you let a guy pitch 3 innings in a night, he's not going to be available for another several days after that. You play baseball every, single day almost. So you've only got 12 or 13 pitchers, and you're using up two every 5th day, you've only got two or three guys who can come in if either of your starters gets hurt or gets in trouble in a game. That's not a good position to be in.
Other than the trouble or injury factor, you also have a talent issue. Major league hitters are really good and if you put pitchers out there who are over extended for their talent levels, they will be eaten alive. Most ML pitchers can handle and inning, maybe 2, but often by the third inning, a player is seeing them for a second time in that outing, and then it's curtains. It's a rare talent to be able to go through the batting order a second time, more so a third and even rarer a fourth time.
Ultimately, a reliever is such because he has a limited pitch selection (one of the greatest relievers of all time, Mariano Rivera basically got buy on 1 pitch). A starter has 3 or 4 and can mix things up to get through the order a few times with minimal damage. A reliever is usually good for an inning or a batter and that's the limit to his efficacy. If there were enough starters to go around, you might not see specialization like this, but there are a limited number of guys who can pitch even 6 big league innings, so we have relievers.
Not sure where to stick this so it gets put in a post script. This is a really cool chart and it illustrates what I'm talking about using ERA. If you look, especially at the last line, the MLB numbers. You can see that the first inning is universally pretty rough, but after that a starter settles in it is pretty good, until about the 5th or 6th inning, and their ERA starts to creep up again. After that you get to see just how effective modern bullpens are. The better question might actually be "why aren't all pitchers throwing shorter outings."
Wax Eagle covers some interesting points, but the most important point in why many relievers typically only pitch one inning is that they can throw the ball harder if they're only throwing 20 or so pitches.
This isn't true across the board; in particular, relievers who use offspeed pitches to get outs likely throw about the same strength as they would as starters. However, flamethrowing relievers typically lose 2-3 MPH from their fastballs when converted to starters; look at Chris Sale for example. He was primarily a reliever his first two years (2010-2011) and then became a starter after that. He averaged 95 MPH as a reliever, and 93 MPH as a starter on his fastball - and had much, much higher maximums; as a reliever he threw 100 MPH his first year in the majors, and hasn't hit much over 98 since he became a starter.
This is why certain pitchers typically are designated as relievers in the current day, even if they're quite talented; look at Aroldis Chapman, for example. He's one of the best pitchers of any sort in the majors, and he's a reliever despite attempting to make him a starter: that's because as a reliever he can simply throw the ball past his opponents (hitting 100MPH on over half of his pitches this season). He'd likely lose a few MPH as a starter, and might be less effective. (He might still be more valuable to the team, but that's a coach and general managers' decision to make.)
Long relievers aren't used (most of the time) because they'd be getting the worst of both worlds. They couldn't throw as hard, because they'd be needed for 60 ish pitches, but they'd only be throwing 1/3 of a game (versus a starter throwing upwards of 2/3). They also wouldn't be able to pitch all that often (relievers who do pitch 3 innings due to a bad starter's performance usually get several days off afterwards). Instead, you can have three guys each throw very hard, plus the flexibility as Wax Eagle notes to pitch to matchups and such, gaining overall more out of your bullpen than you would if you had fewer, longer relievers.
When I grew up playing and watching baseball, the pitcher position was not specialized as it is now. It was typical for a pitcher to throw all nine innings and more if needed. Sometime around the advent of the designated hitter, I think, things started to change. I'm sure there were more factors, but, I have to think that longevity was a reason to switch to specialization. Having a pitcher throw only the first five innings or so meant that he could recover earlier for his next start. That, in turn, translated to more starts. And, since someone had to make up the slack, closers and relievers became more prominent.