Edges are computed as points that are extrema of the image gradient in the direction of the gradient.
if it helps, you can think of them as the min and max points in a 1D function.
The point is, edge pixels are a local notion: they just point out a significant difference between neighbouring pixels.
Contours are often obtained from edges, but they are aimed at being object contours.
Thus, they need to be closed curves.
You can think of them as boundaries (some Image Processing algorithms & librarires call them like that).
When they are obtained from edges, you need to connect the edges in order to obtain a closed contour.