That is called Spell Queue Window:
“The Spell Queue Window is the time in milliseconds in which you’re allowed to tell WoW’s servers about the next spell you want to cast before your current cast is finished. This defaults to 400 milliseconds. Without this feature, you would experience a large delay (2x average latency) between spells.”
Its a feature to reduce LAG.
And after having played around with it (because you can change this default 400 ms) I don’t recommend that you do.
Because its results depend on the speed of connection between your computer and the wow servers. 400 ms is good enough for all but the RTWF people that want to optimize even a 0.0001% DPS increase with their already “lower thank the average Joe” latency.