There is no justice except for that we humans make. If you do a bad thing and no-one finds out it was you, then there are no consequences for you. Of course any normally adjusted child will feel guilt and or shame, and will probably confess, because most of us innately understand we need to pay for our crimes; that harming others is wrong.
Bad things happen to good people, and good things happen to bad people, it's just the randomness of life. This is the only role that religions have, its to give people an explanation of why that village over the hill that stole our sheep; why did they get a good harvest and our village did not?
Of course if you were the village over the hill, you wouldn't think of yourselves as bad, nor do most people think of themselves as bad. Sometimes we do bad things, but that does not make us entirely bad people. Only religion teaches us that we are actually bad people, and that we should despise ourselves and others, and be damned for eternity, and this is certain even from before birth.