Regardless of the legality, one of these situations is clearly ethical compared to the other. In the case were you get a job based on your knowledge of GPL software, you still must respect the license if you use that code commercially (i.e. at your new job). And yes, if you reproduce GPL code you "learned" from, you are violating the license.
A company ingesting an entire GPL codebase without warning or any way to opt-out in order to create a closed-source feature that they and only they will profit off of is clearly not the same as an individual reading the code and getting a job based on those ideas.
A company ingesting an entire GPL codebase without warning or any way to opt-out in order to create a closed-source feature that they and only they will profit off of is clearly not the same as an individual reading the code and getting a job based on those ideas.