That's because you don't just "learn" what we do. We go to a ridiculously intensive school for three years, study another couple months full-time for the bar, and then
start learning how to actually be a lawyer. It's pretty easy to google "why can't I connect wirelessly" and get an answer. It's a lot harder to get a quick answer to "how do I defend myself in a custody action."
The best analogy I've heard is this, from a judge. "If my car was running, and me -- knowing nothing about cars -- decided to start taking it apart and fixing it, I'd probably make it worse. And you would think it's crazy that I didn't hire a mechanic and that it's my own fault for messing it up. But then people come in on matters far more important than their cars -- custody matters, criminal stuff, etc... -- and try to be their own mechanics. And then they blame the legal system when they mess it up."
I get it, lawyers are expensive. But so are plumbers and electricians and mechanics and programmers. Maybe a little more, sure. But this whole "$500/hr" stuff isn't what most people are paying, unless you're a large company insistent on hiring only ivy league grads at 1000 person firms. It's realistically a forth of that amount at smaller firms. And lawyers also have 7 years of school to pay for.