To be honest, I suspected that in the normal way of Kant being a Kant, he must've derived his categories transcendentally, which is his modus operandi when it comes to primary concepts. So I searched, and struck gold:
1.4 Logical Forms of Judgment and the Categories
In §§19–20, Kant contends that the vehicle that brings about synthesis
is judgment, and that this vehicle employs certain forms of judgment,
which are in turn intimately related to the twelve categories. By
connecting [synthetic knowledge] to judgment, and the forms of judgment to the
categories in this way, Kant aims to show that we must use the
categories in the synthesis of experience.
Keep in mind that opinions on what constitutes a synthetic judgment are strongly divided. Kant himself had a very clear idea of what he meant, but may have failed to communicate an exact-enough definition. Julian Baggini points this out in his Toolkit, noting that a way to view the distinction between synthetic and analytic judgments is in whether or not a judgment "adds something to the subject" (§4.3).
What this means for Kant is that in any judgment, there is some experience which is being had. Providing evidence for any proposition requires that an experience of the evidence be possible in the first place. Kant's deduction then unfolds from the argument that categories are a necessary feature of such an experience.
It may appear that Kant has thus plucked his categories out of thin air, but the details of his argument for why experience would be impossible without categories is compelling.