Although God is acknowledged here, the acknowledgement is that God has appointed people to experience both good and bad. The best a person can do is enjoy the good while it lasts. The writer feels those who never lived are those who have it the best.
Hopefully you haven’t had too many days like this, but almost everyone has had some. We see one person experience pain despite living a good life and another one lives a life of success despite living selfishly. Again, if this life is all there is, that’s not very satisfying!