Because you have to feed your newborn baby every 2-3 hours, so whenever they feel hungry during the night, they cry. You can find out if they are hungry by simple indicators, i.e., they make sucking noise, put a finger in their mouth.
Another reason for crying is if their diaper is dirty. Dirty and wet diaper irritates baby and can cause rashes to their bottom. So it’s vital to change the diaper immediately after it gets dirty.