In-universe, guess baku need to live somewhere they can access the dreams from everyone in different worlds.
From Doylist perspective, ZUN has probably seen an article on Jung's philosophy and got fascinated by concept of "the shadow". Persona series might have been an influence too.
The baku aren't really the creators of the dream world, they're more like youkai who can manipulate but the dream world, but they have limits,
I may call myself a ruler, but I'm closer to the zookeeper of a zoo full of dream residents. A zookeeper can't simply make a new animal."
- Doremy Sweet Curiosity of Lotus Asia Chapter 33
Doremy's LoLK profile hints that dreams in the Touhou world are all interconnected
The dreams of all living creatures are, in fact, connected at the deepest levels.
This is why in dreams, you can visit places you've never seen, meet people you've never seen,
and find glitches you've never seen either.
This "deepest connection" is the Dream World. When we go to sleep, we go there in the form of our "dream-self" and thus all dreams occur in it and which means they can all interact and influence each other. It's probably based off the Jungian concept of the Collective Unconscious, the idea that at a deep level, we humans have shared mental concepts and that's why for example we see similar themes occur in mythologies around the world. The Dream World is taking this concept and applying it to dreams which is a cool interpretation that I really like.
So basically, the Dream World exists as the place where all dreams take place, and while it's exact origins is shrouded in mystery, it's probable that it simply arose as a physical manifestation of the fantasies of living beings just like how youkai are physical manifestations of human fear.
It's nice to see that ZUN is integrating psychological concepts into Touhou like with the Komeji sisters. Now that I think about it, there could be a connection between Satori's ability to draw out our memories and make us fight them in dreams and the Dream World itself.