Let’s be honest, the expression “by and large” sounds weird. It mixes two (seemingly) different parts of speech (one would not normally say, for instance, “from and heavy”), and, since its dictionary definition tells us that
it would make more sense to say “by large”, just as we can say “by far”. Be that as it may, “by large” is not standard, and even though it does sometimes appear in English literature, it is probably just a misspelling (or misunderstanding) of “by and large”.
Sailing by the wind
Somewhat surprisingly, by and large does not have anything to do with the adverb “largely”, although they are synonyms. In fact, it was originally a purely nautical term, used by English sailors.
Counterintuitive as it may seem, a sailing ship is able to move against the wind (at a certain angle depending on the type of the ship), thanks to the same aerodynamic principles that allow gliders and birds to fly against the wind and maintain or gain altitude without any internal thrust or wing movements.
This technique is usually called “sailing into the wind” nowadays, but it used to be called “sailing by the wind”. So, when a ship sailed by, it sailed against the direction of the wind.
When a ship sailed in the direction of the wind, more sails were used than when it sailed into the wind because some of the larger sails were not well suited for sailing upwind. In this case it was said that the ship was sailing large (and it did, indeed, look larger).
All in all, “by and large” means “both by [the wind] and large” (i.e. “both into the wind and with the wind”) in nautical terminology. When a ship is “good by and large”, it is good in any possible situation; that is, it is good in general, which gave birth to the modern English idiom.