Many arilines code share so you could be flying on one airline's aircraft but getting frequent flyer miles on a different airline.
For example, you can book a flight on United Airlines web site and get United Airlines FF credit from Boston to Philadelphia but if you do thisl, you will be actually flying on a US Airways plane.