Formal credentialing generally means you demonstrate "I can do this", in a very drawn-out, thorough manner. It's gatekeeping more, but there's a much larger guarantee for your creds to be transferrable from place to place.
In software engineering, you demonstrate "I can do this", in a several-round bout of interviews. And then have to demonstrate it all over again and again, for every single company. Your interview performance is non-transferrable.
My opinion is, the latter is more wasteful as it involves repeating yourself a whole lot.
The former has a higher upfront cost but you are betting in the long run that it will amortize over time as you continue to go on interviews.
The latter has less upfront cost but a greater chance of creating more cost in the long run, depending on how much you interview and where.
OP spent 6 hours- personally I wouldn't spend that much on any assignment, but the bigger issue here is that 6 hours is only valid for one company. Interview "work" is so proprietary and non-transferrable- like currency that is useless outside that one company. You cannot take what you did there and show it elsewhere to expedite an interview. You will have to run through another several-hour process again (whether interviewing or another assignment), for some other variation of a CRUD based problem that they expect developers to do.
I suppose the closest thing we have to avoiding repetition is- the answer many won't like- Leetcode. You still have to navigate through opinionated views of your answers, but at least there are more patterns that carry over that its benefits compound more easily from interview to interview.