I think (I don't know this for fact) the major manufacturers like D'addario, GHS and Earnie Ball get their strings from large spools of strings. They pepare the strings by cutting them to length, putting the balls on and stripping the ends of the wound ones, and they have quality controls in place. They may wash them or prepair them in some other way to enhance their properties. They may also wind their wound strings themselves as well.
There are other smaller companies that buy allready made strings and just package them and put their name on them.
There are definately different qualities of strings, there are some that stretch better than others, and some that break easier than others. There are some that corrode with use and others that don't.
I use D'Addario EXL110's because I like the gauge (the tension and tone is consistent among all strings), they stretch rather than break (they do break on occasion as do all strings), and they return to tune pretty well after they have been stretched. They don't seem to corrode, and I usually end up changing them as they have just become worn out.
I'm not sure if other strings are cheaper or more expensive than D'Addario's - at five bucks a set I think they are worth it andI don't see the need to use anything else when these are working so well for me.