Beginning with the 2008 GFC, this was expanded to buying "distressed assets" (https://blogs.wsj.com/economics/2008/11/10/fed-takes-step-in...). This was, and remains, controversial (as noted in the WSJ link), and poorly understood (I'm still not certain I grasp it well, let alone fully, myself).
My understanding is that the Fed's goal isn't profit, but of buying money into, or selling assets, and hence money out of existence. The Fed's asset-buying targets are better thought of as liquidity-injection targets (where liquidity is money created by the Fed to be injected into the economy). The Fed stabilises asset prices as a buyer of last resort, incidentally to its primary goal of both ensuring sufficient money in the economy and in creating greater ceertainty in asset values which allows banks to function.
The Fed can always buy assets or lend money, as it has the sole power (save the US Treasury) to create money without restriction. And in practice, it makes profit on these transactions (which is contributed to the US Treasury).
The distortionary effects on risk and incentives ... remains fuzzy to me.
This is largely my own conceptualisation, it seems generally to agree with other explanations, and smells strongly of MMT.
I may be badly mistaken, however.
By definition, solvency and liquidity at the country level depend on major asset classes maintaining some amount of value.
That baseline changes based on regulations of what can or cannot be used as collateral for different measures, what ratios institutions have to maintain, etc, but there is a floor of some sort at which point the financial system implodes and the economy collapses.
Given their powers and mandate, preventing economic collapse is of the utmost importance.
Real estate --- residential, commercial, and industrial --- is among the largest asset classes in the financial system, and it acts as collateral and backing of loans and other financial instruments. Those in turn affect banks and their own ability to generate loans, themselves much of the total money supply.
When market value of these assets falls dramatically, it has ramifications across the financial system. The 2007--2008 global financial crisis was the result of a prior crash in real estate valuations. Japan's Lost Decade (1991--2001) was the result of its own real estate-inflated asset bubble collapse. (https://en.wikipedia.org/wiki/Lost_Decade_(Japan)). Money available for business investment (already constraind) will further contract.
Additionally, for many people, lacking a defined benefit pension, real estate is a major component of household asset portfolios.
Whilst real estate asset inflation is highly problematic, and is not a contributor to economic growth, sudden collapse is tremendously disruptive. And very much a concern of the Fed.
Of course, special interest intervention may be another factor in decisionmaking, though there's ample reason for interest without any such.