Despite how difficult graduate school can be at times, the benefits are significant. Of course, you'll learn useful professional skills like doing research, formulating problems and critically evaluating alternative solutions, giving written and oral presentations of your work, and interacting with other researchers. But graduate school -- and in particular the process of formulating, researching, and writing a dissertation -- gives you confidence in your ability to tackle hard problems and to become an expert in a new field. A fellow Ph.D. put it much better than I can:
...it isn't just that I can write technical things and I can talk to other researchers with confidence -- I can talk to almost any authority figure with confidence. Partly this is because I now know what it is to be an expert in something, and although I respect other peoples' expertise in their areas of specialization, I also know that I'm just as respectable and they (usually) aren't any more so than I. I also think I can write about things in other areas, provided I've done my homework and learned the area. I feel empowered! And I would never have gotten this from a CS programming job or even a masters degree.
Of course, there are also the incalculable benefits of finishing the dissertation. Even though it can leave you at loose ends (what will you do with your weekends, now that you no longer have to work on your thesis?) there's often a feeling of euphoria, heightened by exhaustion, when you finally hand in your thesis. As the person quoted above put it:
I think an oft-noted bad thing about finishing is adjusting to no longer having a long term, ever-elusive goal. But now that five months have gone by, I find I'm much more efficient in my work because I no longer have that awful weight hanging by a thread over my head, and much happier, more relaxed, more light-hearted.