An acquaintance of mine ended up getting an angry cop on him and several of his friends one year when they rode their Vincents in Idaho with the headlights off. The funny thing is that according to the state law 49-905(2) 'Every motorcycle [...] shall be equipped with at least one (1) [...] head lamps [...]', but nowhere does it actually state that the headlight on a motorcycle must be lit during the day. And this supported by the Motorcycle Legal Foundation: https://www.motorcyclelegalfoundation.com/state-by-state-guide-to-motorcycle-laws/
Go figure, huh?
Some cops are just a55holes that want to mess with people on bikes. Some aren't -- I remember when I first got my 550K in WA state I didn't know I had to have my lights on. Cop pulled me over, told me to turn it on, and let me loose. Another time the spring on my rear brake had come off and the brake light wasn't coming on with just the rear brake. Cop pulled me over, told me, put the spring on, and away I went.
Lights were mandatory in WA and MA when I lived there, but not AZ -- which was lucky for me as I had a CB160 with a weak charging system.
** I should add that here in Mexico City there doesn't seem to be any rule to have your lights on -- plenty of people don't. But I don't know for sure, and since most cops don't even deal with bikes and people follow the "rules" such as they are pretty selectively, dunno if it would matter (until there was a cop looking for lunch money who thought a motorcycle rider might have it, but cars make such better targets).
Yes, i looked it up: both federal and state law, for the Federation of Mexican States and for the Federal State of Mexico, agree that yes, a motorcyclist must use a headlight during the day.
According to Article 168.II.c of the Transit Regulation on Highways and Bridges of Federal Jurisdiction', federal law dictates the following:
Los conductores de bicicletas, triciclos, motocicletas, trimotos o cuatrimotos tendrán los derechos y obligaciones establecidos en este Reglamento, que sean congruentes con la naturaleza de los vehículos que conduzcan y observarán, además, las siguientes disposiciones:
Tratándose de motocicletas, trimotos y cuatrimotos:
Circular en todo tiempo con las luces encendidasI.E. Drivers of motor- bicycles, tricycles, & quadricycles must have their lights on at all times.
This is seconded by Article 37.III.a of the 'Transit Regulation for the City of Mexico', which states:
Los conductores y ocupantes de los vehículos deben de cumplir con las disposiciones de seguridad indicadas en el presente artículo de acuerdo a la naturaleza propia de cada vehículo.
Adicionalmente, los motociclistas deben:
Circular todo tiempo con las luces traseras y delanteras encendidasI.E. Drivers of motorcycles must have their lights on at all times.
The
enforcement of these laws, however, probably falls more to, as you so aptly indicated, whether or not a 'cop' be 'looking for lunch money who thought a motorcycle rider might have it'.

I have
no idea, however, as to how many persons ride motorcycles their in Mexico City as a percentage of total traffic; but it's possible that, since motorcycles make up a smaller segment of the driving population, the local police therefor may be less inclined to enforcement* ¯\_(ツ)_/¯
Artículo 168.II.c del Reglamento de Tránsito en Carreteras y Puentes de Jurisdicción Federal:
https://mexico.justia.com/recursos/transito/reglamento-de-transito-en-carreteras-y-puentes-de-jurisdiccion-federal/titulo-cuarto/capitulo-iii/#articulo-168Artículo 37.III.a del Reglamento de Tránsito para la Ciudad de México:
https://mexico.justia.com/recursos/transito/reglamento-de-transito-ciudad-de-mexico/*It's equally possible, however, that, since motorcycles may make up a smaller percentage of road-going traffic; that then the local police may be
more inclined to enforcement, since motorcycle being rarer would be more likely to stick to mind... In the end, i have no clue about why enforcement may be lax.