Special warranties, Apple program

Sometimes Apple make mistakes and provide full complete replacement for free of their mistakes but you need to be smart to see if is a problem that can be fixed for free, I have personally experienced 2 of these problems , and I found out them googling, the first one was that they produced for a while iPhones 5 where the shut down button was breaking after few months, to see if your product is covered you need to put your serial number that can be found under settings/general/about into this official website and see if it was.

iPhone 5 button replacement program

MacBook Bottom Case Replacement Program

I am sure there are many more you just need to find them.