Are you saying that the only reason to treat other humans well is because the law says you must?
I would say that is precisely backwards: one should treat other humans well, for a variety of reasons. We write that down in law as a shared agreement. But the law is not itself the reason -- it springs from the reasons.