Origin of band and localized electron states in photoemission of NiO