The tax in question that is a concern is probably not an estate tax due in connection with an inheritance tax, it is probably the federal income tax that applies to the beneficiary in some way.
Typically, if there is a specific devise (e.g. I hereby leave you my nephew $10,000) that is distributed more than one year after the date of death, part of the inheritance is taxable interest income to the recipient.
Another circumstance in which an inheritance could generate reportable taxable income is if the inheritance is of "income in respect of a decedent" (e.g. retirement account distributions, or a final paycheck).
More generally, if the estate had taxable income in excess of $100 as determined in IRS Form 1041 (e.g. due to the sale of capital assets that have appreciated after the date of death, rental income, dividends, or interest received), this estate income is allocated to the beneficiaries of the estate receiving distributions and flows through to them as a result of the "distributable net income deduction" of the estate, and has to be reported on Schedule K-1 from the estate with the beneficiary's Social Security numbers.
So, there are multiple reasons why a W-9 might be required in connection with an inheritance.