The fact that "base pay" is lower than minimum wage is already setting up an exploitative situation. The laws were made by lobbyists who wanted to make sure the newly freed slaves they employed weren't on the payroll from the employer.
"Wrongness" and "illegality" are not the same thing.
* Worker is shown a $5 guaranteed paid.
* Behind the scenes DD picked some base pay. Let's say $1.
* If the customer tipped < $4 then the worker got paid out exactly $5 with DD paying out the difference between the actual tip and the $4.
* If the customer tipped >= $4 then the driver got paid $5 + tips - $4.
So in your example DD paid $3 and the tip was $5 with a guaranteed rate of $5. This means that the worker would've been paid $8.
I agree though, not showing the base pay was very misleading. However, tips never actually replaced the base pay.
[1]: This forbes article has a screenshot of the old page describing the model https://www.forbes.com/sites/bizcarson/2019/06/27/doordash-t...