The below chart shows that AAPL from 2017 beat the analysts expectations. I assume that the AAPL Financials are not public for Analysts to analyze, neither AAPL CFO knows how the Analysts figure out an expectation. But both of their results are a few points apart. How the Analysts figure the EPS out and how AAPL achieve a few points above the Analysts expectations of EPS?
Most companies beat earnings estimates most of the time. So Apple isn't terribly unusual in this regard.
Why do companies generally beat earnings?
- Expectations management. Public companies regularly release guidance to analysts (both in terms of their own earnings target and in terms of qualitative and quantitative factors). As with any goal, a company's earnings target is generally something that they expect they will able to meet or exceed. If a company sees that analysts have set the target too high, they're likely to provide some sort of guidance (i.e. "ongoing trade issues are creating some supply chain issues and may reduce sales") that cause analysts to lower their targets. Then the company can beat the revised targets when they release earnings. Note that the company isn't lying, they're just being conservative in the guidance they provide. Regulators, for example, take a much harder look at a company that regularly misses guidance than one that regularly meets or exceeds their targets. If companies are excessively optimistic, it's usually because management is trying to keep the stock price up (so that management can dump shares at inflate prices) or so that they can borrow money from the bond market at lower rates (which potentially defrauds those buying the bonds).
- Earnings management. Accounting standards exist so that companies have less flexibility to "massage" earnings and that two similarly situated companies account for similar transactions in the same way. In practice, though, companies still have some amount of flexibility about how and when to recognize certain charges or how to structure certain transactions. Generally, companies use that flexibility to help ensure they beat earnings targets most of the time. If they're going to have a bad quarter, they usually use that opportunity to recognize a bunch of charges so that they have one really bad quarter that sets them up for a bunch of good quarters later.
- Analysts, like companies, are conservative about earnings. Some of that is a result of the information analysts can acquire-- an Apple analyst may be able to get figures from some of the factories that supply iPhone screens and use that to estimate iPhone production for the year. Generally, they're going to be conservative when they extrapolate a final number from those estimates, however, to account for things that they don't know (i.e. has the market share of the factories they have numbers for shrunk from last quarter). Some is the result of market incentives-- most investors are going to be a lot more upset at an analyst whose predictions are generally a few pennies a share high than low. And some is the result of analysts getting talked down by companies when the company isn't sure they can meet the expectations.
I assume that the AAPL Financials are not public for Analysts to analyze
All past information is public, at least partially. While very detailed information is private to the company, the information in simplified form is published in annual and quarterly reports. Furthermore, if the company's earnings is going to differ from what they previously said, they have to tell the information as soon as possible to the general public.
Apple is a public company. As a public company, everything that might affect the share price should be made public as soon as possible.
neither AAPL CFO knows how the Analysts figure out an expectation
The CFO most certainly does know. Most likely the CFO has access to the same information the analysts have access to. In fact, the CFO is probably doing the same job continuously than analysts are doing: use whatever information available to determine expected profits in the future.
How the Analysts figure the EPS out?
They use information published by Apple, its competitors, and whatever other information there is available from the market.
how AAPL achieve a few points above the Analysts expectations of EPS?
Now this is a very good question. The analysts have been too cautious in estimating the earnings of Apple. If you roll a dice, to get 4 or 5 or 6 is 50% chance. Roll a dice 12 times. To get 12 times 4, 5 or 6 is 0.0244% chance.
It may be that Apple has had additional information about their financial performance that they have chosen not to publish because they think the effect on share price would be too small to make it necessary to publish it.
The average "earning surprise" has been about 0.10 USD per share positive. The average earnings have been 2.74 USD. So the difference is below 4%. Perhaps the Apple CFO has considered below 4% as so small that the additional information doesn't have to be published. But it's still billions of dollars difference in market value for such a large company. So, if I was the CFO, I would be more open about future performance.