Why can't a transporter save a copy in the buffer and regenerate a copy at that instant if the original doesn't return? There have been many references to patterns degrading quickly and the transporter needing the exact matter it started with however there are examples where these rules have been broken. In TNG "Relics" Scotty kept himself locked in a buffer for 75 years. In TNG "Second Chances" a copy of Will Riker was created due to an energy surge at the time of transport. The amount of energy required should be related to the composition of the human and surely there is enough stored in the ship or they could convert an few hundred tons of rocks and shrubs to regenerate essential crew such as the Captain if he happened to be killed. If they have a corpse even better most of the matter is there just some added, removed or rearranged.
As noted in Borkz' answer, DS9 established that the mental patterns needed to be stored at a quantum level, while other data could be stored at an atomic level, so it required relatively enormous amounts of storage space. That said, DS9 was a very old military station, so it's likely Voyager and such could have had much more available storage (in fact, we see an entire holographic village complete with fully-conscious people on that ship).
From here, we see that humans require between "fifty gigaquads" (to store Chakotay's brain) and "billions of kiloquads" (to transport a person) of data. Taken as normal prefixes, that's between 50 and 1000+ gigaquads.
Note that this conflicts with the DS9 canon, which says the brain itself is far more complex than the rest of the body, while this data considers the brain much less complex than the overall body (which is (reasonably) consistent with the notion that everything is scanned and stored at the same scale). Considering the 50 gigaquads were used during a conversion process (from something alien to a human brain), maybe that was just a buffer, and the entire brain would have taken far more storage. Regardless, we're still looking at less than 10 teraquads per person.
Given that the EMH alone used up to 1000 teraquads for assimilating data (and some "50 million gigaquads", or 50000 teraquads, for the original program), it seems likely the Voyager and newer ships would have no problem hanging onto copies of every crew member while on their away missions, updated on return, with the backup copy stored until the new copy is definitely not an alien or something.
The TNG Enterprise, on the other hand, typically had computers with quads to kiloquads of storage space. Given the DS9's age, it was likely in a similar place. This means the earlier ships would have been simply incapable of storing transport patterns longer than it took to transport the people across.
Lack of Need
The transporters in TNG and beyond are extremely safe. There's very little reason for the majority of ships to bother with backups as a general rule. And it's pretty unlikely you're going to die on a random away mission unless you're a red shirt on the Enterprise.
General Philosophy of Death
As long as I didn't have any philosophical reasons to avoid transporters in general (like, "the thing coming out is just a copy and the real me is dead"), I personally would be ecstatic about the idea of keeping two copies of me at all times. One for my current brain, and one for my best body (relatively young, right after a year or two of intense body training). Then the transporter could just use the prime body with my current brain every time. Further, in the event of my untimely (or timely) demise (which is going to happen eventually), they could just restore me from the last backup, Borderlands-style.
However, the Star Trek universe generally avoids scenarios where humans live much longer than normal. This is mostly an out-of-universe design philosophy, but there is some in-universe rationale for avoiding "unnatural" humanity, from genetic alterations to immortality.
The Scotty Case
My understanding of the episode where Scotty stored himself for 75 years was that he was basically looping himself through a single buffer with some technobabble that doesn't quite make sense. But the idea was kind of like having a mirror and a repeater.
The data is stored in the buffer, then sent towards a mirror. About the time it's returning from the mirror, the last of the data is being sent out of the buffer, so there's just enough time to keep all of Scotty's data in this big loop. Since each repeat cycle slightly degrades the data, there was a limit to how long this could go on.
Overall, it was a crude hack that just barely worked once, and then only because Scotty's awesome, and couldn't have worked for multiple patterns, or during normal use.
A Note on TNG vs. Voyager
As mentioned on the Memory-Alpha page, there is a really substantial boost in reported memory between TNG and Voyager, and it took place over a pretty short time period. Enterprise-D was launched in 2363, while Voyager was launched in 2371.
It's certainly reasonable the Voyager would be substantially better than the Enterprise-D, but we're talking something like a quadrillion (million billion) times more storage space in only 8 years (10 million teraquads vs 10 kiloquads is a factor of 1015).
Given how many highly-advanced aliens the Federation encounters, it's by no means impossible, but it seems more likely the Voyager writers thought "teraquads" sounded cooler than "kiloquads". Using a parallel to the real world, personal computers were using megabyte or lower hard-drives in the mid-80s when TNG came out, so kilo "quads" weren't too crazy of a leap. By '95 when Voyager came out, gigabyte hard-drives were common enough, and kilo was thing of the past. At that point, "tera" was a "futuristic" prefix. (Note, this paragraph is total conjecture.)
We definitely know Voyager was capable of storing multiple fully-sapient holographic people, but it's probably best to assume Voyager "teraquads" are more like TNG "kiloquads", and the total storage increase is thousands to millions instead of quadrillions.
As noted in Borkz' answer, and repeated in MichaelS answer, mental patterns have to be stored at a quantum level. That means you run into the No-cloning Theorem, which says that it is impossible to save a copy of a quantum state - basically, you can't have your cake and eat it too.
There are incidents during the series that violate this rule, e.g., Riker being duplicated, so it would appear that the No-cloning Theorem is not an absolute limit in the ST universe. However, that doesn't necessarily mean that Federation technology is able to do so intentionally. If such a technology did exist, it would likely have significant sociological effects which we see no signs of. (I won't go into detail, but there are a number of other science fiction works based on this premise.)
The most reasonable conclusion is that even if it is theoretically possible, the Federation does not (as yet) have the necessarily technology.
(It does have the technology necessary to permanently store people's patterns at the level necessary to reconstitute their bodies. This was occasionally used for medical treatment, e.g., in the second season episode Unnatural Selection.)
I'm not sure how Scotty's entire pattern would saved. A buffer generally just stores small chunks of a larger set information at a time (Like when youre streaming a video, your computer only stores the part of the video youre watching in memory since the entire video is so big. Now you could probably save it to your hard disk on your computer of watching an HD movie on cable box, it wouldnt even be able to store the movie if you wanted to.
In DS9 "Our Man Bashir" Eddington does manage to save the crew from a transporter malfunction by saving their patterns elsewhere but he explains how their neural patterns take an extreme amount of data and has to erase the entire station's memory to store them. I dont think that entirely answers the question but I think thats the real crux of the issue
I dont think it has anything to do with lack of energy or matter. The amount of information required to produce a corpse is nothing compared consciousness. If you have a corpse thats just the tip of the iceberg in maintaining a constant consciousness. The amount of energy required to produce a corpse could be the same as a living body, but that has nothing to do with the fact that you have to store the arrangement of every neuron or state of every synapse, etc. in order to store its consciousness which is much, much, much more complex. And thats not even factoring in all the other philosophical dilemmas associated with that you could get in to.
There is actually an episode of TNG where it seems like it might be protocol to store copies of at least some of the high-level personnel serving on a starship. Dr. Pulaski gets infected with a genetic vector that makes her age rapidly, in a shuttlecraft. O'Brien suggests they use her last transporter pattern to reconstitute her on board, ignoring recent changes and thereby eliminating whatever vectors carry the disease. Picard contacts the captain of the ship where she was last posted, who informs him that Dr. Pulaski's pattern was deleted from the buffer once she was safely transferred to the Enterprise.
It sounds to me like they probably store the patterns of mission-crucial personnel as a safeguard, but that's just conjecture. Nobody actually talks about it directly in the episode, they just act as if it's the norm.
But, that just makes you wonder why Tasha Yar wasn't saved in the same manner after she was killed by that oil monster. They transported down to that planet, and Chief of Security is a pretty high-level position. But, it's difficult to expect perfect logic in TV writing separated by entire seasons.