The dream doesn't restrict you.

You restrict yourself.

Ego, desire, lust, all constantly affect you. This is no different in a dream, except for the fact that in a dream your actions have no effect in the long run so you can ignore societal rules.

I wouldn't say dreams have restrictions as much as the dream simply bring attention to restrictions that are always there.