Tasks that were once performed by nurses are now done by nurses' aides, and pharmacists have the assistance of pharmacy technicians. Computers have made things faster in a lot of professions, and these methods have all helped. In addition, hospitals have sent recruiters all over the world to find nurses and physicians to fill open slots in American hospitals. This has been an effective method for keeping the shortages down in the richest nation in the world, but don't ask about the impact on healthcare in other countries. The issue gets down to money.
Nobody wants to pay.
Since the insurance companies are big, they have a lot of leverage, and can threaten to take their patients someplace else. Even the biggest hospital is tiny compared with a modest insurance company. Hospitals met these pressures by cutting back on staff, freezing salaries, and generally folding up like a piece of tissue paper. Hospitals have dealt with the nursing shortage by increasing case loads and requiring mandatory overtime. Nurses have dealt with these working conditions by finding other jobs.