When you get down close and look at a trout stream, there's a lot of stuff floating down the river. Most of it is not trout food. I think trout learn to ignore stuff that's not food. They are looking for things that don't look like common debris.

I have no evidence for this, but my theory is that purple makes the fly stand out from all the rest of the flotsam. Sparkly stuff or orange hotspots have the same effect. Once the trout is focused on the purple fly, it may decide to eat it, if the fly looks like food.