Baryon Dynamics, Dark Matter Substructure, and Galaxies