Rethinking macroeconomics with endogenous market structure