"There's no license to be a teacher, or a banker, or a police officer."
Teacher licensing is required in every state that I know of. https://www.teach.org/teaching...
Bankers definitely require licenses, at least those who deal with client money in any significant way (look up FINRA, for example).
For police officers, you have to be vetted and hired by a government agency (which is essentially getting a license) and typically take a an exam, you can't just declare yourself a police officer.
"If the bar was effective at keeping bad lawyers out, then we wouldn't have bad lawyers (ha)"
So, because the bar isn't perfect at keeping bad lawyers out, it's worthless? That's like saying that since seatbelts won't save you in all accidents, it's not worth wearing them.
"and if we believe in a free market (which, the last time I checked, lawyers charge money), then the market should be able to sort it out on its own"
We can believe in a free market but also believe in a regulated market, particularly for things where it's typically difficult for an ordinary consumer to judge value (hiring an attorney isn't like buying an apple), and where the implications of a bad "product" can be very very serious.
Regulatory capture is a real issue, and there are lots of areas where it's a major problem (Institute for Justice has done a lot of work on this), i.e. interior decorators, to take one example, but lawyers (like doctors) are something where a state licensing process does make a lot of sense.*
*It's worth noting that, even in those professions, I disagree in some cases with the degree of regulation involved, i.e. doctors limiting what nurses and physician's assistants can do, or lawyers trying to prevent "document preparers" from handling very typical, standardized situations. If you have a house, life insurance, and $50k in the bank, your spouse is dead, your two kids are grown, and you want to leave everything to those two kids equally, you don't need a lawyer to do your will.