So, in Star Trek IV: The One With the Whales, Dr. McCoy is in a late 20th Century hospital. He passes a woman who's on dialysis and gives her a pill. She regrows a kidney. It's a short, two scene gag that reverses the fish out of water comedy of the rest of the movie.
The Prime Directive states that The Federation should not interfere in the internal affairs of a less-developed culture. In "Symbiosis," Picard notes that such interactions are invariably disastrous for the less-developed culture. Given that Star Trek pulls from a Western tradition, it obviously pulls from European interactions with Native American (and perhaps even African) cultures.
Reality doesn't bear that out. Disease and superior systems of applying force are not the same as having a "superior culture."
On the one hand, The Prime Directive acknowledges that it is very difficult to avoid taking advantage or exerting undue influence when one party has a massive advantage over another. When aliens show up on your doorstep with impressive technology, in-depth knowledge of how space works, and a generally helpful demeanor, you have to either follow their lead almost to the letter or take the material goods and do whatever you want. It's not--really not--because "primitive people worship technology as magic" because really?
The Prime Directive as policy allows civilizations to discover, encounter, and overcome the challenges that technology poses. The human race is no longer on the brink of nuclear annihilation. That's a pretty good step. We've got a long, long way to go, but that's encouraging. Global warming will probably be another, similar challenge. I get the concept that a civilization has to either change into one with cultural tenants based on wisdom or inevitably destroy itself.
If a civilization were to be covertly "nudged" into it by The Federation, would they keep those elements after learning they were socially engineered "for their own good"? The Prime Directive undercuts the natural threat paternalistic, elitist control of other races; the most humble policy of The Federation is also the one which allows whole societies to die.
It also maintains the integrity of The Federation by forbidding, as the cornerstone of its foreign policy, espionage, assassinations, and backing political movements in their contemporaries. Choosing the next High Chancellor of The Klingon Empire, conducting espionage to affect Romulan military policy, and...choosing the next High Chancellor of The Klingon Empire are the sorts of things that Federation citizens in general--and Starfleet officers specifically--should never do. Obviously, Trek writers have a slightly different take on this.
The Prime Directive is a sound political policy. As a voluntary social principle, it's one of the best a society could have. But that said, policy executed without compassion or a society which uses its rules as an excuse to do nothing isn't worth a damn.
In reality, somewhere between giving one woman a new lease on life and curing every patient in the hospital, there's a line. McCoy could have never come close to it by passing her by, but I don't think he'd be the healer or the person we like seeing if he hadn't made the choice to ignore The Prime Directive, toe that line, and be human.