The point of therapy is not to teach you, but to heal you.
The problem is we all carry around a lot of subterranean shame, fear and guilt, and your mind has a way of blinding you too it because those feelings are too intense to handle on a day-to-day basis. As a result, we all have blind spots and dysfunctional habits that we will defend at all costs. Haven't you met brilliant, highly rational people that keep acting stupid over and over again because they refuse to acknowledge their own problems?
We're all a little broken for emotional reasons, not rational reasons. Everyone knows they shouldn't smoke, and drink too much, and spend too much. But lots of people have problems with that, because it's not about a lack of knowledge.
A therapist, over time, gets you to open up, accepts you, and thus shines light on those dark places. When you accept them instead of reflexively rejecting them, you can actually see yourself with more clarity and thus behave more rationally.
So yes, you could learn whatever a therapist could teach you from reading books. But the benefit of a therapist is the relationship. You could also go through the same process with a good friend, but most people are bad at listening and being accepting, especially when you're sharing your deepest secrets. And sadly, most people don't seem to have the time. Haven't you ever tried to share something with a friend, but then they say something judgmental and you never show them that again? A therapist is trained not to do that.