The hidden test cases can be super frustrating, especially when you're passing 7/10 and the timer keeps ticking down. It's impossible to debug besides just staring at the code and guessing what else they might be looking for. Then to ultimately have the company immediately go, "Sorry you didn't check enough green boxes. You've failed. Goodbye."
Although sometimes this is true, most of the time you can't pass all the test because you have written a messed up code that you yourself can't understand. Learning to write the simplest code that works first time one of the most critical skills in programming and in real life also there are no test cases written for you.