From Jellywatch (whence the image):
The genus Velella, known as the By-the-Wind sailor, and Porpita, known as blue-buttons (not to be confused with blue-bottles), are two interesting Hydrozoans (Cnidarians) that live at the surface of the water. Although they are blue-colored hydrozoans and float partly above the water like the Portuguese Man o' War (Physalia), they are not especially closely related to it or other siphonophores...
Velella typically live far offshore in open ocean waters, and their little sails help distribute them using the force of the wind. However because they sail only downwind or at a slight angle to the wind, they are often blown ashore in very high numbers, with millions piling onto beaches in drift rows.And from The Australian Museum:
Most specimens are "left-handed" with the sail going from upper-left to lower-right along their long body axis, but a few are right-handed (Bieri, 1959).
Physalia sails at a slight angle downwind and the course is determined by the curvature of the float and the underwater resistance of the rest of the colony. The float may project either to the left or to the right; the left-handed forms sail to the right of the wind and vice versa. Thus, if the sailing angle of one form leads to its stranding on the shore, the others sailing to the opposite side of the wind may escape.