There’s no such thing as a loophole. There is the tax code. Period.
Most “loopholes” are designed by the govt to drive behavior.