Like any subject matter that is complex it requires someone to have specialized training to understand and navigate. We all have a working understanding of the legal system, but sometimes we need expert opinion. Few people are willing/able to master the subject matter so supply relative to demand is low.
The legal system is complex because our world is complex. We are constantly expanding human endeavors (Space law wasn't an issue until Sputnik) and changing current laws (Marijuana laws have changed in many states). It's not just a matter of learning the law once - it is constantly changing and requires an expert to be always up-to-date.
You're paying $.25 for the piece of paper and $199.75 for the lawyer's knowledge of how to file it.
Death penalty litigation is always more expensive than just jail.