Because a “medium” is fundamentally made up of atoms, and atoms contain bound electrons. Thus no electric interaction in a medium can occur without those bounds charges reacting and contributing to the effects of the electric force. It just so happens, the actual effect of the bound charges can be summarized into a modification of the permittivity and permeability of free space.