Well, since he is God, of course he is just. Even though he is merciful to those that choose to love him and those that may, to be the ultimate authority he *must* be just. He is called "Judge" and that's what judges are supposed to be. That's one of the consequences of sin, (i.e. separation from God), you have to face those consequences. If your prayer is not in God's plan, then he will answer with a no, but, I believe, with something better in the long run. As for why to pray in the first place, I believe that God likes to hear from us, regardless of being omnipotent. It's part of that free will he has given us; we can ask for things and choose to follow his will or not. It's that kind of relationship he desires that makes him who he is. I hope this at least partly answers some of the questions you have. :)