[W]hy isn't there an official system to record it?
Existing Systems
Sometimes there is. For example, the Uniform Commercial Code and many of the other Uniform and Model Act that are adopted by state legislatures has an official commentary which is often adopted officially by the legislature along with the Act.
It isn't uncommon for legislation to include one or more sections discussing the legislative intent with regard to the bill.
Almost all tax legislation adopted by the United States Congress is accompanied by a new Joint Tax Committee report for each major draft as well as a Congressional Budget Office estimate that includes an explanation of the provisions.
A complete record is generally made of every different draft of legislation, en route to its adoption, identifying every vote taking on a bill and every hearing or floor session of a house of the legislature where the legislation was considered. In many legislatures, a verbatim record of each of those hearings and floor sessions containing all of the debate that was conducted on the bills is available.
At various times the rules of one or the other houses of the U.S. Congress, and mandates of a state legislative services agency at the state level, requires that a check list of frequently asked questions about legislative intent (e.g. the effective date, whether the legislation is retroactive, whether it creates a private cause of action, its budget impact, is there a statute of limitations and if so what is it, etc.) be completed for every bill with any deficiencies addressed. Most legislative bodies also require that bills be given an official summary when introduced, although those summaries are often not updated as the bill is amended over the course of the legislative process.
Difficulties With Implementing These Ideas
This said, there is not a perfect solution. Legislative history is particularly hard to document in an American style legislative process where the drafters of a law need support that is fleeting and highly contingent on particular bill content.
More comprehensive official commentaries are more frequently found in government bills in parliamentary systems in which the Prime Minister's coalition has near total control of the legislative process leaving it free to focus on drafting and implementation issues rather than case by case negotiations over how to get a bill passed at all.
Simple Legislation
Sometimes, legislation is simple and there isn't a need for legislative history.
For example, perhaps a law amends the number of judges assigned to the 17th District Court in Colorado from 14 to 16.
Time Pressure In The Legislative Process
Sometimes, legislation is prepared under intense time pressure, and there isn't a capacity to prepare an official legislative history in the necessary time frame.
For example, perhaps an appropriations bill needs to be passed to prevent a government shutdown, or a state legislative session ends on a date certain and the bill is a compromise introduced to replace previous bills that weren't making progress that is newly introduced and has to be passed in just a few days.
Legislation Whose Meaning Is Obscure To Hide It From Opponents
Sometimes, legislation is deliberately opaque so that people who favor the bill can utilize it, but people who oppose the bill don't realize what it is doing and hence do not organize opposition to the bill.
For example, a bill to allow standard preservatives to be added to foods without case by case FDA approval might be worded in a way that is deliberately opaque to undermine opponents efforts to stop the bill.
Unforeseen Issues
Also, even when there is legislative history, it doesn't always address the question that is presented in the judicial process, often because nobody ever considered the issue.
For example, suppose that a law regulates bladed weapons, which at the time of enactment consisted of knives and swords and the like, and then somebody invents the light saber. Was a light saber within the scope of the legislature's intent?
If the law prohibits the use of lead and mercury in weapon blades because it leads to complications when people are wounded with them and to contamination of land fills when they are disposed of, the legislative intent, from context, was probably not to include light sabers in the definition of a bladed weapon.
But, if the law is designs to prohibit people from bringing weapons into court houses, the legislative intent was probably to prohibit light sabers as well.
So, the question of whether a light saber is within the definition of a bladed weapon can depend on legislative intent in a manner that may be discernible from context, but impossible to include in an official commentary which obviously wouldn't talk about something that hadn't been invented yet.
Another quite common unforeseen issue is that legislation will be based upon certain assumptions about how things are usually done that has become obsolete in literal terms.
For example, legislative may assume that people who own stock usually have physical stock certificates in safes in their homes, but that practice has fallen into disuse, and how the law applies to the current reality must be worked out.
Passing The Buck To The Courts To Resolve Difficult Details
Sometimes the legislative history doesn't always address the question that is presented in the judicial process because the political forces involved considered the issue and could agree on legislative language but not upon what exactly that legislative language meant and intended to let the courts figure it out.
For example, most states have a statute which states that decisions about parenting time and parental decision making shall be made "in the best interests of the child" with little or no discussion of how that standard is supposed to be applied in practice, because even though everyone agrees that this is right standard to apply, they can't always agree in particular cases or even broad classes of cases what the "best interests of the child" are or what considerations matter most in deciding that question.
Passing The Buck To Executive Branch Agencies
Sometimes legislation is unclear in order to delegate authority to a regulatory agency, rather than to the Court.
For example, most environmental laws delegate most of the substance to executive branch agencies.