Why is it necessary to use underlayment under vinyl?

Typically the sub-floor is not smooth enough, containing rough marks, nail heads and other imperfections that could be easily transferred through the vinyl. The underlayment provides a smoother platform for a more appealing appearance.