Depends on the manufacturing process. Some factories only route the pickup cavities after the guitar is finished. Whereas some just mask it out during the spraying process. Make economical sense for mass produced instruments, saves time/effort/cost.
Anyway it isn't always the case, some pickup cavities are "finished" in conductive paint for shielding purposes.