As we know, Sale is a port in Morocco that was once very much favored by Barbary pirates. Sale is pronounce "salay" in the North African languages but was corrupted in English to "sally", like the girl's name. This word seeped into the vernacular, as words will, and was overlaid onto other existing words to mean a variety of things over land and sea.
The French verb saillir means to rush out from, and this was the first origin of the term as used in warfare and aboard ship. In particular, a sally was a rush of soldiers hurrying out of a castle or fortress to attack besiegers. In this sense, the term sortie was also used but has come to be more closely associated with reconnaissance than attack. From the same verb comes the specifically nautical term which means moving something by sudden jerks or through the pooled force of a group of men rushing forward. A crew could sally a ship that had run aground back into deep water, for instance.
A sally-port is an egress cut in a fort to allow the men to sally forth from it. In the case of a fire-ship - one loaded with black powder, sent floating toward and enemy and set ablaze at the last moment - sally-ports would be cut into the quarters of the ship to allow its crew to exit before the big boom. There was also a sally-port at Portsmouth in England whose waters were reserved for the exclusive use of men-of-war's boats.
A sally (or sallee) rover was a Barbary pirate ship or, in other instances, the pirate himself. Salleeman was also appropriate in reference to the ship. Since these ships roamed all over the Atlantic, from Ireland to Newfoundland and the Gulf of Mexico to the Mediterranean, the now common term for going out into the world - sally forth - was probably kept alive in the English language by its use in reference to these corsairs and their ships.
Finally there is the sally lunn, a sweet bun slightly larger than a muffin eaten hot with butter. This was originally invented and sold by a lady of late 18th century Bath, England named Sally Lunn. It was a favorite of British sailors who had the good fortune to recuperate from injuries at the famous spa.
I'll leave you with that tasty thought. And for those of you wondering, yes; that is Stephen Decatur up there in the center of that painting once again kicking pirate ass.