If the interview process yields a US person equally qualified, GP can’t (and doesn’t) certify the guest worker’s green card application. But that doesn’t mean they have to fire them and send them home early: they can let the guest worker work out their contract if they want to (which they probably do, it probably pays well compared to other options). And an experienced, already-trained, good employee is probably more valuable to the business than an immediate, unplanned new hire anyway.
So yes, certainly screwed up incentives—but I don’t see how it would be better to require guest workers to put their jobs in immediate jeopardy just to apply for permanent residency.
To extend the visa they have to swear they couldn't find a citizen to do this job, and aren't willing to lie.