The sum of cubes formula can also be derived by slightly generalizing this answer by Mike Earnest for the sum of squares case.
Consider counting ordered quadruplets of integers $(w,x,y,z)$ s.t.
$0 \le w, x, y < z$
$1 \le z \le n$
When $z=k$ the number of ways to choose $(w,x,y)\in \{0, 1, \dots, k-1\}^3$ is $k^3$, so the total is $\sum_{k=1}^n k^3$.
OTOH all such quadruplets can be classified as follows:
$w, x, y$ all distinct: For a particular ordering, say $w < x < y < z$, we have ${n+1 \choose 4}$ choices. There are $3!=6$ orderings among the $\{w,x,y\}$, so this case gives $6 \times {n+1 \choose 4}$.
$w = x = y$: Then we're simply choosing two numbers, $w$ and $z$. So this case gives ${n+1 \choose 2}$.
Exactly two of the three $\{w, x, y\}$ are equal: There are $3$ ways to choose the equal pair, then $2$ ways to decide if the remaining value is bigger or smaller. Once we decided that, say $x < w = y$, we are simply picking three numbers $x, w, z$. So this case gives $3 \times 2 \times {n+1 \choose 3}$.