Is sanding always necessary before repainting a wall?

In most cases, yes. Sanding ensures proper adhesion and removes imperfections, even if the wall appears relatively smooth.