I gather the USMC's air arm goes back at least as far as WW2, so I guess it was to do with combined-ops in the Pacific, but if the USMC is part of the US Navy, wouldn't Navy fliers be doing that anyway?
Let me correct a few misconceptions.
The US Marine Corps is NOT a part of the US Navy. It falls under the Department of the Navy for administrative purposes but is a separate arm in its own right for operational purposes. Furthermore, Marine Aviation did not come about in World War 2. It dates back, for all intents and purposes, to this man: https://upload.wikimedia.org/wikipedia/commons/c/c1/AACunningham_1stMarineAviator.jpg This is Lieutenant Colonel Alfred Austell Cunningham, and the photo was taken in 1912. As this is not directly related to your question, if you want follow-up on this, go to Wikipedia: https://en.wikipedia.org/wiki/Alfred_A._Cunningham (it's a nice article with references).
Marine Aviation was created Feb 26 in Philadelphia, Pennsylvania, when Cunningham was instructed to organize an Aviation Company for the Advanced Base Force. In 1919, Major Cunningham was assigned to command the new Aviation Section, Headquarters Marine Corps. So, by 1941 the air arm of the USMC was already well established, even if not very powerful (they were flying goddamn Brewster Buffaloes as their main fighter aircraft).
And now to answer your question: why did the USMC (I know I'm skipping the National Guard, sorry) get its own air arm? Because it needed one. The USMC utilizes Navy ships, but it's an independent force, and thus has to rely mainly on itself in conducting operations, especially once the marines get further away from the coast. Probably if the USMC brass in 1917 hadn't thought of creating its own air arm, some provisions would have been made eventually for the Navy to provide all types of air support.
Source & further reading: The United States Marine Corps: A Chronology, 1775 to the Present, by John C. Fredriksen. ABC-Clio, Santa Barbara, CA, 2011.
To add to /u/tlumacz post, the reason the Marine Corps has kept its air arm is because the entire doctrine of the Marine Corps is centered around the Marine Corps Air-Ground Task Force
For instance, take a Marine Expeditionary Unit (MEU): it consists of around 2,200 battle-ready Marines (including some tanks, armored vehicles, artillery, etc.) and their air support in the form of a medium lift squadron (MV-22 Ospreys), heavy lift helicopters (CH-53E Super Stallions), and air support aircraft (AH-1/UH-1s Cobras/Hueys, and AV-8B Harriers).
The MEU also has the equipment (such as bulldozers, forklifts, etc.) to sustain any sort of expeditionary warfare from the sea virtually anywhere in the world. In addition, they have the supplies to engage in full combat for 15 days without resupply.
In essence, the Marine Corps operates using Navy ships (the MEUs are deployed onboard amphibious assault ship groups) but is otherwise capable of deploying virtually anywhere in the world, hence their reputation as America's 911 force. Their air arm is completely dedicated to these combined air-ground forces with their helicopters/tiltrotors providing logistical support as well as air support and their fixed-wing assets specializing primarily in air-to-ground operations.
The Navy's own aviation isn't always going to be present, especially since it is centered around carrier aviation, for which a supercarrier won't always be present.
There is a historical precedence for this as well: the Battle of Guadalcanal, where the Marines on the island were virtually left to fend for themselves after US naval defeats off the island forced the Navy to withdraw for a period of time. The Marines thus had to rely upon their own ground and air assets for a time.