Also, medical schools limit the number of seats available to prevent an oversupply of labor from occurring. This helps keep salaries very high.
Right now, the big thing keeping the supply of software engineers down is the lack of housing available near software companies, but this will slowly change as more and more companies start outside the bay area.