What's going on with my university courses?

Long story short- My background is in EE. I landed a quasi-software job out of college. For various reasons, I decided I wanted to do more software. So, I started interviewing around for software jobs and flunked my interviews hard. At the time, I assumed I flunked because I lacked the formal educational background. But now that I'm taking university courses I'm starting to question that assumption.

My courses put little emphasis on code clealiness. Every now and then they pay lip service to code cleanliness but they don't enforce it in their grading. The foucs is all about the "end result" rather than the process of writing good code. A student could turn in an assiginment riddled with repetitive code blocks, deceptive comments, non-descriptive varible names, main functions that run on for hundreds of lines. If such a mess manages to reverse a string, or output prime numbers, or whatever, they still get an A. That's not right.

My courses also put little emphasis on testing. Even when they cover it, they do a bad job. In my DSA course, the professor gave us a code sample with all the "tests" (if print statements count as tests) crammed into the main method. Why is he allowed to get away with that? He is giving students the impression it's acceptable to cram all their tests into a single method. It is not. Tests should be independent of each other. And why is he using print statements instead of a real unit testing framework like JUnit?

In my programming languages course, the professor gave a code sample that has a switch statement repeated 5 times in the same function! It's mind-boggling that people are paying thousands of dollars to look at bad code. Moreover, the lecture notes are riddled with broken code samples.

What exactly am I supposed to get out of these courses like this? In tandem with the courses, I've also been looking into Udemy, books on clean coding princples, and open-source projects. I seem to get a lot more out of the latter resources. In spite of these realizations, I feel pressured into taking more university courses so my resume can be more "competitive."