geom_path connects the points in the order they appear. You see it goes from 6.26 (2pi - epsilon) to 0, so geom_path draws a segment from (6.26, 1.017) to (0,1.03). Segments in polar coordinates are arcs around the circle (not really a circle here because the radius is changing) and the segment goes backward in radians. Hence the 'circle' going backward to the next point which starts the next circuit.

The gaps appear when you did your grouping for the same reason - just those backward circles are not drawn anymore.

Based on its documentation ggplot2::coord_polar appears to have been designed mainly for pie charts and not actually plotting functions in the standard polar coordinate system. This would explain some of the behavior (e.g. expanding the x's from 0, 6*pi in your first example). Perhaps that's a new topic...