Can anyone explain to me how Bernoulli's equation arises from conservation of energy?
The derivation of Bernoulli's equation using conservation of energy can be found in many textbooks and websites. Here's one to get you started:
Why not look that over and then ask any questions that arise?
Why is it that you only account for the kinetic and potential energy change in the blue volumes.. What about the fluid between them?
The blue volumes are assumed to be the same volume of fluid as it proceeds in time.
You're looking at two different time slices
All the action takes place in those end volumes. Nothing changes for the fluid between them.
Here's how to understand this derivation. Think of the entire chunk of fluid between the two cross-sections (A1 & A2) as "the system" to be studied. We want to study what happens when that system moves such that each end sweeps out a given volume of fluid. What Bernoulli's equation does is equate the work done on the system (done by the pressure at each end) to the change of kinetic and potential energy of the system.
To answer your question again, note that the net effect, as far as calculating the change in energy goes, is to move a mass of fluid from one end to the other. This is the only mass that changes kinetic and potential energy---the rest of the fluid doesn't change.
Separate names with a comma.