In software it's not like that. There are very few laws on the book about how to write software, so there's no single authority that defines the right answer or the scope of reasonable questions. It's far more open. Even just picking a set of programming concepts would immediately cause controversy. Like, should monads and type-classes be a part of the professional qualifications? Most programmer would say no, because Haskell isn't widely used in industry. But CS degrees do sometimes test people on that sort of thing!
(Also, in both cases, the government hires members of the profession to define the standards.)
I'm convinced we could have a bar exam for software engineering, but I'm not at all convinced that we should. It would make my life easier personally, but it would keep a bunch of people who followed less traditional paths out of the industry and I think that would be bad.
That could be trivially fixed tomorrow, either by universities or (better) by an accredited certification body.
I mean, I'm sure there weren't bar exams for lawyers and professionals either, at some point in history. What prevents us from creating one for sw developers? As long as it didn't require additional attainments just to sit for it (i.e. you should not need a university degree), it would make the whole process more efficient for literally thousands of companies.