However, in this case, Uber and Lyft are not actually using willingness to pay. They are using ability to pay. To make the system more efficient, as you suggested, they would do best to implement a bidding system so that customers could directly opt to pay more (directly indicating their level of need).
The algorithms in the article would unfairly prioritize wealthier drivers over poorer ones, if used to maximize margins, regardless of the level of need of either party. Wealth (ability to pay) is not an indicator of how badly you need to be somewhere else. Willingness to pay is. Their system is flawed.
The differential pricing you've described might be beneficial to society, but the differential pricing discussed in the article is most certainly not.