The fee only applies for consular processing, i.e., people outside the country.
There are a bunch of people in the country as students in US universities with an F visa. If they get a job, the employer can apply for an h1b, and the fee doesn't apply to them because they aren't getting a visa, they are changing status (might sound like potato/potata, but the difference exists and applies).