Select -> Select edge loops. weird result

Why do the horizontal edge loops also get selected when using “selec → edgeloops” command?

I was hoping to get something like seen below

That operator selects loops of edges not faces. When you select faces in Blender it actually selects the edges and the vertices also. So when you use an operator that works with edges it will use the edges from the boundary of the face.

I find the best way to do what you want is to: select the button edges of the faces that you have selected, select → edge rings, then convert the edge selection to a face selection by ctrl clicking the face select button.