Pharisee here.
Joshua and the other judges were chiefs. They lead armies, built alters, pronounced judgements and whatnot. Often advised by prophets.
Mosaic Law, the scrolls of the torah, dod not exist at this point. Not even according to the bible. This came later, during the time of kings.
The stuff quickly scribbled on rocks by The Almighty so that Rabbi Moses could go deal with that whole mess down below... it's sparse. It's got a list of things god likes to eat. A recipe you are not allowed to make.
It doesn't even tell you what to do when a Midian Schiester sells you a faulty woman. Not one word on right to representation, if you can believe it.
American' legal system is based on a mostly illiterate culture's legal tradition, form the black sea. It's very good at dealing with disputes involving fish, pillage and private property.
Also... who ya'callin godless. Get your own god. You can go back to Thor if you don't like what you got here.