As the titles says (this might be more clear though), weather abilities still have their effect on turns that other weather has been set.
Here's a short description of the start of a battle I had:
>Opponent sends out Pelipper, who has drizzle, causing rain, and Ludicolo (who likely has maximum speed investment), who has the ability Swift Swim
>I send out Whimsicott, who has Prankster, and Manectric (who has maximum speed investment)
>Turn 1, Whimsicott sets sunlight with Sunny Day, with priority thanks to Prankster
>Ludicolo moves next, despite not being Scarfed and the rain being replaced, and Manectric Mega Evolving
I've also tried this while replacing Manectric with a Chlorophyll Victreebel that had max speed investment, and despite what should be a speed boost due to sun, it moved after Ludicolo.
I haven't had the chance to try this out with other weather or other weather-based boosting abilities, but they also may have the same problem.
I've tested these two scenarios in Pokemon Showdown, and in both cases, Ludicolo doesn't move immediately after Whimsicott.