In some markets, having the lights wired on was/is a legal requirement.
My country had the rule for safety reasons, in recent years they dropped it but many manufacturers still seem to sell the hard wired headlights.
I guess if it's just easier to build them the same for every market, cheaper probably too.
Some of our imported bikes just had the light switch still on the handlebars but the actual button was cut off!
Looked dodgy but it was the laziest/cheapest way to make sure they were road legal here for importers.