Are you sure blue headlamps are illegal? I remember in my boy racer days I have coloured side lights for some reason and it failed, the comment was 'blue is the only other colour you can have forward facing as side lights' or words to that effect and I seem to remember checking in in the highway code and it was right.
But you are quite right, things like HID aftermarket kits do not conform to DoT regulations so 'should' be an MOT failure. However, whilst things are illegal to use, it's not illegal to sell, buy or own. If people want to buy something for their car that they are not allowed to use, then people will sell it to make money. If the end user decides to actually use the item in a way they are not designed, that has no concern of the seller if they have notified the user that it's illegal to use on the road.
But you are quite right, things like HID aftermarket kits do not conform to DoT regulations so 'should' be an MOT failure. However, whilst things are illegal to use, it's not illegal to sell, buy or own. If people want to buy something for their car that they are not allowed to use, then people will sell it to make money. If the end user decides to actually use the item in a way they are not designed, that has no concern of the seller if they have notified the user that it's illegal to use on the road.