If a resource is so scarce that its real value is higher than the official one, the producer will have to either increase production, or accept that black markets will appear.
You can just drop the course - pretty much every university (in the United States, at least) allows students to drop courses one or two weeks into the semester without any record (on say, a transcript). Otherwise students cannot possibly plan their semesters, since courses may not make material available until after the semester actually starts.
So if you are planning to sell the slots and it does not work out, you just drop the course, no harm to you.
"No harm" except for the several slots that were taken up by people hoping to make a quick buck (selling the trade) who drop a day or two into classes and cause the students who actually NEED the class to be very stressed and annoyed and possibly have to adjust their plans because they don't think they will be able to take a class even though it will actually be free by the third time the class meets.
It also just fucks with the University's ability to gauge class interest. In my university, if a class filled up early in the registration window, the University would try to increase capacity or add another copy of the class, but that's not always an option.
A reminder that this is not done for technical reasons. Plenty of colleges all across the US, big and small, custom-built registration software or purchased on the open market, have fully functional waitlist features. "first come first serve" is a policy choice.