Because it's a surer thing than everything else. Brady in the 6th is a once in several generations type thing. A 4th round pick has a sub 5% chance of being a starter at best. Wilson and Dak are massive outliers.
Look at the starting QB's in this league. Tua, Allen, Darnold (soon to be replaced by Lawrence), Ben, Jackson, Burrow, Mayfield, Mahomes, Carr, Herbert, Lock (likely replaced by another 1st rounder), Rivers, Tannehill, Watson. Us and the Jaguars are the only teams in the conference without a first round QB and the Jags are likely replacing Minshew with a first round QB. Then in the NFC you have Rodgers, Stafford, Jones (likely being replaced by another 1st rounder), Wentz, Smith, Bridgewater, Ryan, Murray, Goff. Most of the league is first rounders, most being top 10. Even guys like Rodgers were just really lucky falls.
The reality is the way to get a QB is to get one in the first round. Yes it's flipping a coin, but flipping a coin is better than rolling 12 sided dice and needing to get snake eyes. Yes a 1st rounder is a lot of capital, but when you don't have a QB, you really need to take your best shot at flipping the coin even if you could miss.
In this league you are better off spending consecutive years spending a top pick on a QB than hoping to get lucky later in the draft or believing in the sunk cost fallacy. Arizona recognized this, the Jets are recognizing it, etc. You just can win consistently without one.