I imagine most people have a black outfit handy for funerals, but I expect there was quite a rush to the shops from 'ordinary' people who had been invited to the Queen's funeral. You would want something a bit special for such a once in a lifetime occasion.
I sing in a choir, and we wear black when we perform. Having lost weight since our last concert, pre Covid, I needed a new outfit, but couldn't find anything in the shops. I took a chance and bought online, and was lucky that it fits, and looks good. It will also double as a funeral outfit.
It never used to be 'the thing' to wear black to a wedding, or to emulate the bride by wearing white. Both seem quite commonplace these days. Times change, I suppose.