Actually, a castsequence has to execute in order.
So, if whatever the next spell is happens to be on cooldown, then Fireball casts.

As soon as it refreshes, Fireball cannot cast as something with a higher priority (listed earlier) will cast.



Quite a few proc type abilities are listed, in the same place as the Fireball in your example.

Not really sure why, but at the moment proc abilities fire off when they're available.
They shouldn't, and chances are it is a bug that they are, but Lava Burst would fire off at every opportunity with this macro:

/castsequence Flame Shock, Lightning Bolt (x8)
/cast Lava Burst