depending on the Jurisdiction, you actually were in violation of law!
In germany it is a misdemeanor to drive with the high beams on in such a fashion that it blinds or dazzles other road traffic, such as traffic from the front. It is also a traffic violation to drive with front lights that don't properly illuminate the street - such as a broken one.
In the worst case, improper illumination voids the validity of the safety certificate (TÜV) and thus you may not drive the car at all on public streets until you have repaired the defect. Not having a valid TÜV can mean you are also not insured!
In the US: YES, a stop is most likely legal
In the united-states, Terry v Ohio is the governing case. It prescribes that, to initiate contact with a car and detain it on the street curb, reasonable suspicion is enough. What could be reasonable suspicion for the police?
In the case presented, 'The high beams are on constantly to hide non-functioning/sufficient normal light' would be the very first thing that comes to my mind, so there very likely is reasonable suspicion to initiate the stop. Ot of course 'The high beams are suitable to dazzle me for a split second, and thus the driver endangered traffic'. Endangering traffic can actually be a felony in some cases. Or just 'They shone their brights into my eyes and violated the High Beam statute' - which is actually the most likely case.
As a result, while a broken headlight is not reasonable suspicion to search a car, them and high beams might qualify to make a stop reasonable, especially if at first just a verbal warning not to dazzle oncoming drivers was intended by police. Only if the local law is worded in a peculiarity, that might invalidate a stop.
And you might be in violation of law here too!
High Beams can be a traffic violation within 500 feet of oncoming traffic and 300 when trailing another car, if they are not
so aimed that the glaring rays are not projected into the eyes of the oncoming driver.
Under Florida Law, it is also a noncriminal traffic infraction to drive with the high lights on in such a way that it blinds traffic within 500 feet of them oncoming and 300 if you are behind them. Again, the test is that the beams are only ok if they are
so aimed that the glaring rays are not projected into the eyes of the oncoming driver.
Here comes a possible source for your quote: New Jersey has a similar high beams law, but also a recent case. The judgment from the New Jersey Surpreme Court is only valid in New Jersey. According to it a high beam violation has to be witnessed by the officer themselves to justify a "terry stop".
If you dazzle a moving police cruiser they may stop you. If you dazzle the moving car in front of them, they may stop you. But if you beam your high beams at a stopped car or no car at all, then the police can't stop you.
HELD:The trial court and Appellate Division properly concluded that the motor-vehicle stop violated the Federal and State Constitutions. The language of the high-beam statute, N.J.S.A.39:3-60, is unambiguous; drivers are required to dim their high beams only when approaching an oncoming vehicle. Neither a car parked on a perpendicular street nor an on-foot police officer count as an oncoming vehicle. The judgment of the Appellate Division upholding the trial court s suppression of the evidence is affirmed.
Had the officer, in that case, operated the car while being on the same road, the stop would have been constitutional. But he was on foot in a crossing street.
Wait, actually the quote stems from Texas. However, it has nothing to do with high beams but additional lights such as "Angel Eyes". Texas too has a High Beam Statute, which just like other states, bans blinding oncoming traffic:
(c) A person who operates a vehicle on a roadway or shoulder shall select a distribution of light or composite beam that is aimed and emits light sufficient to reveal a person or vehicle at a safe distance ahead of the vehicle, except that:
(1) an operator approaching an oncoming vehicle within 500 feet shall select:
(B) a distribution aimed so that no part of the high-intensity portion of the lamp projects into the eyes of an approaching vehicle operator; and
Even in Texas, blinding the police cruiser would thus be enough to stop the car, at least for a verbal warning and lecture.
Common courtesy
While it might not be against the law to dazzle someone everywhere, it actually does impact the other drivers: there have been crashes induced by traffic running high beams and blinding oncoming traffic, which then ran off the road or into other cars. In some countries, if they catch you for causing a crash that way, you are in for negligence.
As a result, it actually is common courtesy in Europe to dim off your high beams when you notice oncoming traffic, and, if you don't run high beams yourself but notice high beams oncoming to flash them up for a brief moment so you get noticed.