It's because the really totally amazing thing about our bodies, is that we have what's called voluntary control like running, for instance, and our muscles respond by working. Or involuntary control, like breathing, our lungs will work without our thinking about it. So men have voluntary behavior, for instance, when males ejaculate, the "launch sequence" can be voluntarily started, but erections (wood) are involuntary like in the morning, and also during sleep, off and on during the whole sleep cycle. The involuntary part of us has evolved to make sure that we continue as a species and survive. The voluntary aspect allows us, well, to have fun, make choices, accomplish things,etc. When I was in Medical school learning all of this information, I really thought it was so completely amazing, and it's great you asked the question, because you must thing it's amazing too!