I mean, a lot of trades do have standardized tests. The LSAT for law school, the MCAT for medical school, and the CPA exams for accounting come to mind. I don't know why computer science hasn't organized in this manner, maybe because it's a younger field or maybe because there are simply too many people and employers don't care enough about having certified employees.
CS does have a lot of certifications, which are generally regarded as crap by most university-educated CS people. Part of the reason is that a lot of certifications test you knowledge with specific tooling, and that tooling may become obsolete rather quickly in the field.
It's also worth noting that a lot of the tests you talk about aren't valued particularly higher by their own fields. Most lawyers I know have commented that the bar exam [1] primarily tests material that is largely irrelevant to the actual practice of law, to a degree that scoring too highly on the exam tends to be seen as "you wasted too much time preparing for the exam."
[1] The LSAT isn't a test of whether or not you've mastered law school material, it's a test of whether or not you are allowed to be admitted to law school in the first place. The bar exam is the actual necessary certification to be a lawyer.
It's a younger field. A lot of self-taught people think they will be excluded (they wouldnt be). There is a deliberate effort by execs to lower the salaries of software developers by ensuring there are no barriers to entry and flooding the market which the vast majority of the workforce has been tricked into going along with.