(Note, what you call $a_i$, I call $b_i$ to keep with standard single-step nomenclature).
This condition is sometimes known as the quadrature condition. Essentially, we can write down a table of constants for a general single-step ODE integrator in the following form:
$\begin{array}{c|cccc} c_1 & a_{11} & a_{12} & \cdots & a_{1n} \\ c_2 & a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ c_n & a_{n1} & a_{n2} & \cdots & a_{nn} \\ \hline & b_1 & b_2 & \cdots & b_n \\ \end{array}$
The matrix $A$ is the matrix of $a_{ij}$ elements, and the vector $\mathbf{b}$ is the column vector of $b_i$ elements.
To ensure $0$-stability, and therefore convergence (via a more involved theorem), we must have
$\mathbf{b}^TA^{k-1}\mathbf{1} = \frac{1}{k!},\ k = 1,2,\ldots, p$
for a method of order $p$.
Having this condition allows us to set an estimate of local truncation error to
$d_n \approx h^p\left(\mathbf{b}^TA^p\mathbf{1}-\frac{1}{(p+1)!}\right).$
(Much of this was refreshed from the fantastic book Computer Methods for Ordinary Differential Equations by Ascher and Petzold).
Proof of this is a little bit more involved, certainly more than I care to put in an MSE answer, but the short version is that $\sum_i b_i = 1$ is a necessary condition to achieve $0$-stability.
It is also worth mentioning that in the table above, for an explicit method, only the sub-diagonal entries are non-zero. So, for the standard RK4 method, the table looks like this:
$\begin{array}{c|cccc} 0 & 0 & 0 & 0 & 0 \\ \frac{1}{2} & \frac{1}{2} & 0 & 0 & 0\\ \frac{1}{2} & 0 & \frac{1}{2} & 0 & 0\\ 1 & 0 & 0 & 1 & 0\\ \hline & \frac{1}{6} & \frac{1}{3} & \frac{1}{3} & \frac{1}{6} \\ \end{array}$