It's how the airline gets paid for the flight.
At check in, the airline receives the relevant flight coupon(s) from the ticket or electronic ticket. The coupon, whether paper or electronic, is needed for the operating airline to claim the value of the flight back from the original travel agent or airline that issued the ticket, and who received the money from the purchaser in the first place. The coupon (and the money) is not transferred earlier because once it is out of the agent or original issuer's hands, the flight related to it cannot be cancelled or changed until the coupon (or the money) is transferred back to the original issuer. Everyone has to play by the same rules, to ensure interoperability between airlines and travel agents worldwide.
However, some low cost airlines, like EasyJet and Ryanair, do not participate in the "normal" way ticket accounting is done, they just collect all the money at the time the booking is made. Travel agents who wish to sell their flights must arrange to use their special and proprietary systems. These airlines are free to arrange their check in system however suits them best. They still have an interest in knowing how many people are likely to show up, in collecting passport or immigration information where required, and estimating baggage weights for the flight. But they do not need to obey the rules on time limits.
You probably have noticed that you often buy your flight from a different company than the airline itself. Maybe you buy the ticket from a travel agent. Or perhaps even a different airline. Often many airlines are involved in a complicated itinerary, such as a round-the-world ticket.
There are many millions of travel agents around the globe and hundreds of airlines. But they are not independent. Airlines often need to work together, not just on codeshares but for interline feed too, and travel agents anywhere could be selling a journey for any airline. Therefore we need a single, universal system for moving money between airlines. It's no good to make it up for each individual transaction, (unless you are a low cost carrier who sells your tickets yourself only for your own flights).
So how does the ticket seller who collects your money distribute it to the operating carriers, and more importantly (considering we are talking about billions of dollars moving around the globe every year) what is the audit trail for this process? How do you keep track of currency exchange movements in a fair way?
When you buy a flight or a journey, you are actually buying a ticket. This used to be a paper ticket, but now it's electronic. But the actual process is the same as before, it's just an electronic implementation of the paper. The ticket is your proof to the airline that you paid an organisation it trusts for the flight. The airline will only distribute its unique ticket paper to travel agents it trusts. With electronic ticketing, only travel agencies it trusts will have access to its e-ticket server. The airline may also trust the ticket paper of other airlines through a formal process called an interline agreement.
The ticket also has, for each flight, a "flight coupon" of certain monetary value attached to it. That value is determined by the appropriate fare for the journey.
At check in, in the old days, you presented your ticket to the airline. The airline detached ("clipped") the flight coupon from the ticket and kept the flight coupon. In exchange, you got a boarding pass. At the end of the month, the airline collected all the paper flight coupons and figured out who issued each coupon based on their serial numbers. It presented the coupons back to their original issuers and in exchange gets the financial value of those coupons. Since this happens only once per month, it's a lot easier than money moving about in each ticket transaction.
The system is exactly the same now, except the tickets and coupons are electronic instruments that are transferred in the background when you do your check in.
Also, the International Air Transport Association publishes a monthly exchange rate for all currencies based on the average over the past month, to ensure currency movements do not unfairly affect any individual carrier. If anyone has any questions about a fraudulent ticket or a defaulted payment, there is a clear paper trail to follow.
But why doesn't the travel agent just send the money right away and give you a kind of a receipt? If you wanted to change or cancel your itinerary, the travel agent would have to claim all the money back and send it out again. When dealing with paper tickets, making changes could take weeks. Also, in some circumstances it is necessary to issue a ticket for travel occurring more quickly than money can be moved between accounts. This is particularly the case when moving capital between certain countries, such as to Syria or Iran, where capital controls may delay the settlement of such accounting. It makes sense to settle it all after travel with the flight coupon system.
So we need a universally agreed system for flight coupons to be detached and given to the operating carrier. In the case of changeable or cancellable tickets, we need a way for the passenger to say "I definitely want to exchange my flight coupon for a flight today". The agreed time is no earlier than 24 hours before departure of the first flight on the ticket.
Although the air carrier does want to know about final loads and baggage weights, the real reason for the check in is to facilitate the coupon collection.
However, not all airlines are part of this system. Some of the low cost airlines don't care about the interoperability advantage that this system offers. They find it is too expensive to run. So they have their own way of managing ticket sales and running the finances. Each travel agent must sign up to their proprietary system and make payments immediately. Such airlines will do the "check in" according to their own requirements.