Black patches on wall are due to absorption of the paint by the wall surface.
to ensure uniform paint and colour tone on walls and ceiling, a primer coat is applied on wall surface, which improves the bonding of paint with wall surface without allowing it to getting absorbed and gives a consistent tone.