Why do babies make weird noises and cry while asleep?

Dreams. They act out what is happening in their dreams, more frequently than this (sleep-talking) happens in adults.