This seemingly irrelevant result (after all, none of the conditions are met in the real world) is still taught and studied because it tells us something very important. That is, if capital structure matters, it is precisely because one or more of the assumptions is violated. It tells us where to look for determinants of optimal capital structure and how those things might affect optimal capital structure.
Miller and Modigliani published a number of follow-up papers discussing some of these issues.
The theorem first appeared in: F. Modigilani and M.Miller, "The Cost of Capital, Corporation Finance and the Theory of Investment," American Economic Review (June 1958)