First, I need to correct a misconception you seem to have. The length of time you spend in jail does not normally determine if something is a felony or a misdemeanor. Whether something is a felony or a misdemeanor is based on how you're charged. And it's not like you happen to be charged with something with a maximum sentence of 365 or 366 days; if you are being charged with a felony, it's because the decision was made that your alleged crime was serious and should be treated as a felony. If you're being charged with a misdemeanor, ditto. Prosecutors charge knowing the difference between the two.
The distinction was not originally "punishable by more than a year in prison" vs. "punishable by at most a year." In fact, it originated well before the idea that the default punishment for most crimes is confinement for a term, where the term is dependent on the severity of the crime.
The original distinction was about forfeiture. A felony was a violation of a feudal relationship between a lord and a vassal; if a vassal violates their duty of loyalty to their lord, their relationship ends and their property is forfeit to that lord. Not all serious crimes were felonies. Murder was normally not a felony, because it didn't violate that duty of loyalty.
Later on (post-Normans), murder and other serious crimes did result in forfeiture. The term broadened to include these crimes; at this point, "felony" meant "this crime results in your property being forfeit." These were also the most severe crimes. This is the point where "felony" meaning "exceptionally severe crime" really became established. However, the technical distinction based on forfeiture became muddied, because of another punishment that almost always went along with it: execution. Blackstone, in his Commentaries on the Laws of England, complained that people are mixing these two up. The meaning generally shifted to "crimes which were punished by death," but scholars did know that the proper meaning should really be "crimes punished with forfeiture." The distinction mattered. Because felonies were so serious, the procedure involved differed in several respects.
I happen to know you're in the US and my main source is about the US, so let's hop across the Atlantic Ocean to the colonies. Here, forfeiture was pretty much unknown around the time of independence. The popular understanding of "felony" was still "capital crime;" the legal understanding tended to be "the common-law felonies plus things the legislature designated as a felony."
Nearer the end of the 18th century, the number of crimes punishable by death dropped substantially in the US. The default punishment for most serious crimes shifted from execution to confinement in a prison (this is when prison became the default sentence for even very serious crimes in the US). These new prisons were very different from the older jails: they were designed to reform their inmates, and turn them into productive members of society. But not all crimes need that; with less serious crimes, you don't have to go about fixing a character flaw, you just have to show to the criminal that doing this bad thing results in this punishment.
The lack of a firm definition of felony became a serious problem shortly after this change. Originally in the US, things worked basically like in England. Legislatures passed laws, which might refer to older laws by name, but there was no organizing principle. Lots of the criminal law was bound up in precedent. It was extremely difficult to find out for sure what the law even was. Instead, there was a major push to codify the law. That means you would have a code, which contained, in organized form, all the laws relating to crime.
One of the earliest and most influential American penal codes was actually never adopted. It was written by Edward Livingstone for Louisiana, and was intended to wholly supplant the common law (Louisiana would be the perfect state for this, because it still has a civil law tradition). Livingston didn't use the term "felony," but did distinguish between "crimes" and "misdemeanors." The main systematic difference was not in the penal code itself (the punishments were set out on a crime-by-crime basis), but in the corrections code. Crimes were punished in a penitentiary designed to reform the prisoner; misdemeanors were punished by simple imprisonment. Crimes were all punished by more than a year, while misdemeanors could be punished by anywhere from a few days to two years. The important thing was where and how you were punished, not for how long. While this code was never adopted, it had a major influence on the New York code of 1829.
The New York code was designed to rationalize the law, but not do too much in the way of substantive changes. In particular, the old idea of a "felony" was not abolished; it was preserved, with real significance (part of the point of keeping the term was that they didn't want to lose all its baggage), and so it needed a definition. They basically adopted Livingstone's definition. Felonies were always the more serious crimes; since serious crimes were now evidence of character flaws to be reformed in a penitentiary, the crimes where you got sent for reform were the felonies (plus, of course, those punished by death). All others were misdemeanors. They also decided that punishment for more than a year, in a jail that's not designed to reform you, was bad; no jail sentence could be more than a year.
Since confinement continues to be the main form of punishment, this definition has managed to stick without issue. The forfeiture and capital punishment definitions became obsolete as those punishments became completely obsolete or very, very limited in use.
That's pretty much how things got where they are now. It makes some amount of sense to distinguish between bad crimes and not-so-bad crimes, without needing to list out the bad crimes. This is not actually unique to English law; the French penal code also makes this distinction. The term survived the feudal context in which it originated because it was useful. As confinement became the main type of punishment, and as (at the same time) confinement for serious crimes was paired with efforts to reform and rehabilitate criminals, the old distinction shifted to distinguishing between things where you needed that reform and things where you just needed punishment. Then, it shifted in some places to being about the length of said punishment, as an alternative way of expressing the same basic idea but which could be more easily applied to varying systems.
Will Tress, Unintended Collateral Consequences: Defining Felony in the Early American Republic, 57 Clev. St. L. Rev. 461 (2009)