There WAS a federal law preventing states from legalizing sports gambling . . . but yesterday, the Supreme Court struck it down.
It was a 6 to 3 decision, with Justices Ruth Bader Ginsberg and Sonia Sotomayor voting against, and Justice Stephen Breyer agreeing with them "in part", which I had no idea was a thing. He dissented on one issue, but otherwise agreed with the court's ruling.
The dissenters thought the law could be amended or pared down, without being entirely repealed.
It remains to be seen what kind of effect this will have. One recent study showed that 32 states would be interested in legalizing sports gambling to some degree if the federal law was struck down.