They say to God, 'Depart from us! We do not desire the knowledge of your ways. What is the Almighty, that we should serve him? And what profit do we get if we pray to him?'
This is prosperous rejection of God. No, this is not a heresy to write this down. The reality that Job's counselors have delusionally refused is that often wicked men without God prosper materially. They die with really big bank accounts. These people do not "appear" to prosper. They do not put on a show. The wicked materialist does prosper because he has put all of his efforts into gathering the stuff that is around him to him. And the fact is that unrighteous people can and often do accumulate wealth. It is one of the easiest ways to comfortably slide into a Godless eternity.
So the assertion of Job's friends that wicked people always have their possessions and life joys taken from them in judgment is fallacious. Did not even Jesus teach us the parable of the rich fool? The issue is not material wealth. The issue is the content of the desires of the heart and just what those desires bring a person to do and to order his live around.
Job's point is that those who are committed solely to materialistic pursuits do not desire God. They shoo Him away. They dismiss the giver of all good things, not even knowing that it is only by His hand that they can live and breathe and have their being. They see no material profit in the worship of The Lord. And the fact is... they are right.
There is not materialistic gain in the worship of The Lord. If it were so, all people would be given keys to a mansion upon becoming God-fearers. Worship of God is about personal life change. And if you just want to build your life around naturalistic assumptions and the rusty trinkets and treasures of life, you don't need God to do that. Of course, you are left with the unanswered questions of life and death gnawing at you. But if your bottom line is "profit", you'll get what you want. But you better hope you are right, because it is an "all in" wager with your life at stake.