At what point should an edge loop terminate?
Face loops only works with quad polygons which always have two opposing edges. A face loop does not depend on the shape of the quads face, it will always follow the opposing edge to the next face.

Edge loops are a bit more sophisticated. If you loop select a free edge (one that only touches one face) the loop will try to find other connected free edges. This depends on the angles of the edges. If you loop select a closed edge, it will try to find the opposing edge at any vertex, which works fine if four edges meet but not if five or three meet.