I'll borrow from my pal SCP1127:
"To cross state lines when shipping, you must have an FDA license, register with the Bioterrorism Act, have a recall protocol in place, and keep detailed production information on their forms. You also must have FDA approved nutritional labels. FDA kitchens must be separate and have a pricey list of requirements. Failure to follow the regulations results in fines by the feds. Any bakery would have no problem with the compliance, but in areas where the requirements are more simple, there would be a problem. Your state Dept of Ag has the packet. As far as shipping, you would need to comply with the requirements. Since all of the major companies that ship do it the same, I assume that this is the way it is done to comply with the regulations. "
You also have to check with the cottage food law in your state to see if you can even ship locally - most do not allow it.