While a lender can (and will) ask the IRS for your tax transcripts, this is to verify the information in the copies of the tax returns you submit to the lender.
This one is counter-intuitive and may run contrary to the advice you hear from family or friends (who aren’t in the industry and don’t know how things work these days).
Don’t Just Pay All Debts In Full (At Least Not Ones You Wouldn’t Have Otherwise)