It’s not really a “loophole,” it’s a standard way to give away absurd sums of money.
Have you ever tried to donate billions of dollars? It’s actually extremely difficult.
You have to find causes you’re passionate about/things that society needs, find the correct charities to give the money to, make sure your money actually goes towards the thing they say it will (this is difficult), and then figure out how much you can actually donate (you can’t just give N dollars to company Y. They’ve got zero experience managing that much money, and no way to scale into doing it efficiently.)
What happens then is you have $100b to donate, and mostly only do it $10m at a time or less.
Warren’s kids are old now. They’ve all been donating money for YEARS (it’s a mandatory part of their trust).
So yeah, you receive tax benefits by transferring shares to a foundation you also control, but that money is now earmarked for charity. It doesn’t flow both ways, and the laws on this are very tight (bad actors will find a way, but what’s new?).