Thats a good point. The law is a first order approximation at people coming to a consensus on secular morality. I would say though, that even for atheists, morality goes beyond what is legal.
There are things that are legal, and I believe should remain legal, that are nevertheless immoral (in my opinion, as an atheist). For example, lying to someone who trusts you. I think in many cases such lying can be immoral, but it shouldn't be illegal, because I don't believe the law should be about enforcing thought crimes. Of course certain lies are illegal (perjury, fraud, slander, filing a false police report, etc), but there are many immoral lies that should be legal.
There are also situations in which breaking laws would not be considered immoral by most people, but it would still be illegal. But we still have to enforce and respect the law, because we can't write in a bunch of ambiguous exceptions and loopholes to try to catch every case.
So in my opinion, while the law is a very rough approximation of secular morality, it is not the same as a system of morality, even for atheists.