Codesharing allows the airlines to offer service to more cities under one reservation. Say for example I want to go from Pittsburgh to Burbank CA. There are no direct flights. Airline A can fly me Pittsburgh to Phoenix, Airline B can fly me Phoenix to Burbank. By codesharing, I can fly both under 1 reservation, only checking in once, my luggage is tagged straight to Burbank.
Codesharing really has nothing to do with regional jets. Regional jets are used for cities that don't have enough passengers to support the large jets plus they can offer more frequent flights than if they were flying bigger planes. I'd rather have the choice of 4 flights per day on regional jets than 1 flight per day on a big jet.