Why do we need so many dummy variables in a regression with categorical predictor? Why not use binary encoding instead of one-hot encoding? If we have $k$ categories of a categorical variable, why do we need $k-1$ dummy variables?
For example, if there are 8 categories, why don't we code them as
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1?

Only 3 dummy variables would be needed as opposed to the commonly used $8-1 = 7$ dummy variables.

The problem is not to encode the different id values of the categories.

if there are 8 categories, why don't we code them as
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1?


Instead, the problem is to encode the different effects of the categories.

Your suggestion is to use only three dummy variables to model the effect as
$$\text{effect of category $=$ $\alpha_1$ (if category $=$ A, C, E, G) + $\alpha_2$ (if category $=$ A, B, E, F) + $\alpha_3$ (if category $=$ A, B, C, D)}$$
In this way you can indeed encode eight category values by a binary 3 bit binary number.
If we choose $\alpha_1 = 1$, $\alpha_2 = 2$ and $\alpha_3 = 4$ then we can get the values of the 8 id values
$$\begin{array}{}
A & 1\alpha_1 + 1\alpha_2 + 1\alpha_3 = 7 \\
B & 0\alpha_1 + 1\alpha_2 + 1\alpha_3 = 6 \\
C & 1\alpha_1 + 0\alpha_2 + 1\alpha_3 = 5 \\
D & 0\alpha_1 + 0\alpha_2 + 1\alpha_3 = 4 \\
E & 1\alpha_1 + 1\alpha_2 + 0\alpha_3 = 3 \\
F & 0\alpha_1 + 1\alpha_2 + 0\alpha_3 = 2 \\
G & 1\alpha_1 + 0\alpha_2 + 0\alpha_3 = 1 \\
H & 0\alpha_1 + 0\alpha_2 + 0\alpha_3 = 0 \\
\end{array}$$
But we are not interested in modelling the id-values 7,6,5,4,3,2,1,0. Instead we want to model the entire possible space of effects. That space is 8-dimensional and not 3-dimensional.
