You need to be familiar with EU law to understand this.
It is much easier to explain in German, because there are two different terms for the two different kinds of warranties:
Garantie
...and...
Gewaehrleistung
While the term "Garantie" stands for the warranty the manufacturer gives you, the term "Gewaehrleistung" means that whoever sells something has to make sure whatever he sells you is OK at the time of the sale for a period of 2 years for movable goods, and 3 years for fixed goods (floor, windows,...).
This is where it gets tricky.
If a defect shows up within the first 6 months after the sale, the law says that the defect has been there all along, and the seller has to either repair or replace what he sold you.
However, if a defect shows up after the first 6 months have passed (you as consumer are still well within the 2-year period then!), the consumer has to prove to the seller that the defect HAD BEEN THERE AT THE TIME OF SALE.
This is virtually impossible to prove in the most cases. How should you as a consumer prove that the TV set that stopped working stopped working because of a defect that had been there since the beginning?
This is where the manufacturer's "Garantie" kicks in.
Because it is virtually impossible to get any service from the seller after 6 months, you have to rely on the manufacturer's "Garantie".
In Apple's case, this period lasts 12 months, or 2 to 3 years total if you have AppleCare.
For many other manufacturers, the "Garantie"-period is much longer, but there is - AFAIK - no mandatory "Garantie" period manufacturers offer (but all manufacturers do it because if they wouldn't do it, no one would buy their stuff).
Long story short:
If for example an iPad or a MacBook fails after 7 months, under EU law, you would have to prove to the seller that the defect had been there all along, which in most cases is not possible. So the seller can send you away without offering help without violating any laws.
But Apple will repair the iPad or MacBook, because it's still within the 12 months manufacturer's warranty. If you have AppleCare, it would be 24 months (iPad) or 36 months (MacBook) of Apple warranty.
The problem is most people (almost all of them) don't get the difference between "Garantie" and "Gewaehrleistung" (in some languages, there are not even two different words for the two different concepts), and think Apple gouges them by selling them AppleCare.
But in fact Apple doesn't. (Which shouldn't mean Apple's standard warranty period of 12 months is enough - in fact, it's laughable and a shame).