I am not after the meaning, I am wondering how this phrase originated.
Shakespeare actually uses the expression four times, but as ‘the short and the long’ rather than ‘the long and the short’. It occurs twice in ‘The Merry Wives of Windsor’ as ‘He loves your wife. There's the short and the long’ (II.i.124) and ‘Marry, this is the short and the long of it’ (II.ii.59). In 'A Midsummer Night’s Dream’, it’s ‘For the short and the long is, our play is preferred’ (IV.ii.34), and in ‘The Merchant of Venice’ it’s ‘Indeed, the short and the long is, I serve the Jew’ II.ii.117-18). The OED, however, has this citation from a source around 100 years earlier: ‘Thys ys the schorte and longe’.
The OED’s earliest citation for the actual words ‘the long and the short of it’ is from a work by one William Walker in 1690.
The OED’s definition is ‘the sum total, substance, upshot’. It’s not perhaps too difficult to see how the expression comes to have this meaning, suggesting as it does that, however you look at something, whether briefly or in detail, the conclusion is the same.
This is sometimes people recognizes that an expression describes. "Put it into groups and divide it evenly" this means in the olden tradition manner this simply the same whether it is short or long.
From Plato Statesman - the long and short speech that brings the essence into being and the excess or deficency of which determine the good or bad of the action. Because the end does no justify the means, the statesman operates by persuasion, and the expenditure must be in proportion to the reward. Shakespear took many ideas from Ancient Greece, including to be or not to be. But he just used the expressions without understanding them,
The long and the short of it refers to old weaponry used in wars. The long refers to halberds on very long poles that men would brace into the ground. They would then raise the points as armored men on horseback charged, unseating the enemy from their steeds. Then, men with swords would wade into the fray and kill the downed enemy, "making short work" of them. This was the long and the short of it.
It's a term originated from future contracts. The buyer (the long) and the seller (the short) once the long and the short complete the trade is concluded. To bring to a conclusion - the long and the short of it.