How does the ego work?

If I believe I can be happy only if material circumstances arrange themselves in a particular way, my ego will turn those conditions for happiness into demands.

The universe then fails to comply with the demands.

The ego cries: the universe has disobeyed me!

This is playing God.