Maine Coons come from North America. They're considered a 'natural breed', meaning they weren't intentionally human-made (like a Ragdoll, for example).
There isn't much info on where / why / how the original cats appeared. It's most likely they started out from the native cats in the Maine, New England, North Eastern American area in the mid 19th Century, hence the name. It's likely that they naturally evolved to live around various farmers' properties, scavenging on small game and vermin. As a result of natural selection, they were known as robust, muscular, working cat.
Apparently, the farmers would take their best cats (at keeping down vermin) to markets, and present them (or their offspring) to other farmers, who would purchase them for their own properties. Later this evolved into showing and domesticating them into pet / family cats.
Earlier history beyond that is sketchy / mythical. There's stories of cats travelling on Viking ships from Scandinavia. It makes sense that Norwegian Forest Cats, Siberians or Turkish Vans might contribute to the earliest lines.
Another tale is of Queen Marie Antoinette's Turkish Angora cats during the French Revolution. The queen boarded the cats on the ship when she was trying to escape, but she was captured and executed. The cats travelled to Maine, and from there, mingled with the native cat population.
There's other tales of Persian and Chinchilla cats mixing with the Northern cats which likely introduced the silver gene into their coat colours.
The most fun (but physically impossible) story is that the Native American cats mated with racoons!
Many of the cats were polydactyl, meaning they had extra digits / toes. This was thought to help with mobility in the snow / on the ships. The early show breeders tried to stamp this trait out, it was deemed undesirable / not very pretty. In recent years, it's become reaccepted into the show world in some countries, including Europe and New Zealand. The TICA standard allows for polys to be shown and bred.
The polydactyl gene has a couple of studies related to Maine Coons (poly is actually a trait found in many species, including humans, rats and birds). The studies show that in isolation, the poly gene codes for extra toes, it doesn't cause pain with this presentation, and it's unrelated to 'double-paw' or 'radial hypoplasia' aka 'twisty cat' (they're coded by different genes). It's simply the presence of extra toes - any number above the standard 5 on the front and 4 on the back). It's a naturally occurring, dominant trait. It wasn't introduced by humans. However, once we discovered it, humans did selectively breed for it sometimes.
I personally find it to be an endearing and unique trait. The only other cat that has poly included in their breed standard is the Pixie Bob. We do have poly's in our lines, and I really love them.
See below for some links to historical articles.