Microeconomic Origins of Macroeconomic Tail Risks