These days a coding test has a pretty standard minimum set of features to get a pass, and they include reasonably well organized code and having some tests. If you're working alone those are less important but as soon as you join a team they're critical.
I really got the impression they didn’t even look at the code or execute it to see if I achieved success or followed instructions.
When I do technical interviews I assume the candidates code works (and it often doesn't, but that's not the point). I review it first, then I see if it meets the acceptance criteria. If your code isn't the sort of code that would be acceptable in the organization it doesn't matter if it works.
I would rather reject a candidate on quality than failing the test. Also, occasionally, if the candidate has made an obvious error that stops their code working but it's clear they write great code I might still recommend making them an offer.