It's not, it's an art form. The issues that are an art, are what goods to throw in the basket, where to measure those prices, how to weight the items in the basket, how to measure the product itself, and when to replace the items in the basket. The 60s didn't even have Internet, cell phones, color TV, etc, but we supposedly we can say its easy to compare? ...I can give examples of each and the issues. It's been known to overstate inflation over the long run.
It doesn't much matter what goods are in the basket as long as you maintain the same goods. Once again, you are not trying to measure an absolute value, you are measuring the change from year to year. Inflation is a general increase in prices. You want to avoid volatile commodities like oil and a lot of food stuffs like coffee, because they will take sudden jumps that will reduce the value of the index over the short term. But every time someone thinks that they have come up with a better consumer price index it is tested against historical data and after an initial blip correction they quickly revert to the same year to year price increase, inflation, as the current CPI. As you would expect it to do.
And new products like computers in the 1980's or more recently, smartphones aren't included because their prices are volatile when they are first introduced.
And yes, people who have to pay based on the CPI naturally feel that it overstates inflation. But any time that they have tried to come up with a better CPI they have failed to prove the point. Once again, after a short correction the improved index invariably returns to tracking the same as the current CPI. So that the people who believe that the CPI have resorted to just repeating over and over again very loudly that the CPI overstates inflation, in the hopes that people who hear it often enough will come to believe that the falsehood is the truth. Obviously it works with people who don't understand what is being measured and how it is being measured.
With the internet we are now capable of tracking the prices of almost everything in almost real time, certainly, day by day. And as you would expect, it shows that the current CPI is representative of the inflation that consumers face and the core inflation index that is used to set interest rates is a good representation of core inflation that providers of goods and services face. MIT is doing this research with a crawler that checks prices on the internet daily. Try searching for 'MIT inflation research'or something like it.