The U.S. Justice Department sued Virginia Wednesday over a law restricting the sale of certain semiautomatic weapons and high-capacity magazines.