Not saying all the schools are good. (some look slightly sketchy to me)
"Why would a company hire you, who just finished a boot camp, as opposed to someone who have years of coding experience and knowledge?"
An odd premise, its like asking why a company would hire someone straight out of college.
Companies hire from devcamps because the good ones are taught by people who work in the industry and know what they would want a colleague to know, furthermore they ask the potential employers what they are looking for and teach that in a hands-on environment.