Claim: The theory behind Kaisai no genri is that originally kata began as sets of paired drills or "sparring sets" practised by ancient martial artists, but over time large numbers of these drills became difficult to remember but still, the defensive portion of the drills were still separate, also worth noting that these would probably have been Chinese martial art forms - where the movements are not always identical to how techniques would be applied in combat.
Evidence: Over time large numbers of these drills became difficult to remember and so the defensive portion of the drills were assembled together into units and became the first kata.