This is tutoring.
Everything else it does is a waste of time. That's where you'll find most of the actual time spent though, and it is certainly not an educational aim. The aim is to grade on recall. It is not to motivate, or guide.
No. At best this means you had a terrible experience, and are generalizing in ignorance. At worst you are dug into a position and are willing to defend it without integrity (a sadly popular and often successful approach).
Many (most?) of my tests were open book and they were hard because they were puzzles requiring you to have absorbed the book to the extent that you could reason beyond it. The tests would probe our understanding of an idea by asserting a small change in the initial assumptions, and have us complete the derivation with that new assumption. Test questions were novel complications of the problems in the book.
That was my experience, and it was a good one. I'm sorry you didn't get that.
The other benefit is subject gate keeping. Departments at least in STEM, don't offer pointless classes.
An autodidact might not know what's valuable and might not always muster the energy to get through. They also might not have the integrity to give themselves a fair test.
So yeah, school is useful beyond addressing the scarcity of books.