What triggers the body to ejaculate and produce sperm?

Testosterone. It is a complex process involving several glands in the body all under the influence of testosterone. Our genetics determine this. The trigger overall, though, is the production and stimulation of and by testosterone.