Why are the vertices extruded instead of the edge?
You need to select the edge and then extrude. Select the edge using the icon marked in yellow.

EDIT:
When the vertices option is selected you can perform actions on the vertices them self. So you can extrude every vertice separately, or like in your case the ones you selected. When the edge option is selected you can perform actions on the edges. And the same for faces.