Some people pray to praise God or give thanks for blessings, they are so much eager to worship God. But there people that pray only when they want to get something, too much self-centered, selfishness..
haha you're right, it's like a double moral thing. They just remind of God when they are in a hard situation.