Suppose your four categories are eye colors (code): brown (1), blue (2), green (3), hazel (4)—ignoring heterochromia, violet, red, gray, etc. for the moment.
In no way (that I can currently imagine) would we mean that green $ = 3\times $ brown, or that hazel $=2\times$ blue as our codes imply, even though $3=3\times1$ and $4 = 2 \times 2$.
Therefore (unless we for some reason do want such meaning to slip into our analyses), we need to use some sort of coding. Dummy coding is one example, which eliminates such relationships from the statistical stories we want to tell about eye color. Effect coding and Heckman coding are other examples.
Update: your example of two variables for four categories does not match my understanding use of the term "dummy code" which typically entails replacing $k$ categories (say 4) with $k-1$ dummy variables (sorting observations by category):
id category dummy1 dummy2 dummy3
1 1 1 0 0
2 1 1 0 0
3 2 0 1 0
4 2 0 1 0
5 3 0 0 1
6 3 0 0 1
7 4 0 0 0
8 4 0 0 0
Here category 4 is the reference category, assuming that there is a constant in your model, such as:
$$y = \beta_{0} + \beta_{1}d1 + \beta_{2}d2 + \beta_{3}d3 + \varepsilon$$
where $\beta_{0}$ is the mean value of $y$ when category = 4, and the $\beta$ terms associated with each dummy indicate by what amount $y$ changes from $\beta_{0}$ for that category.
If you do not have a constant ($\beta_{0}$) term in the model, then you need one more "dummy" predictor (perhaps less often termed "indicator variables"), in effect the dummies then each behave as the model constant for each category:
$$y = \beta_{1}d1 + \beta_{2}d2 + \beta_{3}d3 + \beta_{4}d4 + \varepsilon$$
So this would get one around the issue of creating nonsensical quantitative relationships between category codes I mention at first, but why not use user12331-coding as you suggest? user12331-coding candidate A:
id category code1 code2
1 1 0 ?
2 1 0 ?
3 2 1 ?
4 2 1 ?
5 3 ? 0
6 3 ? 0
7 4 ? 1
8 4 ? 1
you are quite right to point out that one can represent 4 values using 2 binary variables (i.e. two-bits). Unfortunately, one approach to this (code1 for categories 1 and 2, and code2 for categories 3 and 4) leaves the ambiguity indicated by the question marks: what values would go there?!
Well, what about a second approach, call it user12331-coding candidate B:
id category code1 code2
1 1 0 0
2 1 0 0
3 2 0 1
4 2 0 1
5 3 1 0
6 3 1 0
7 4 1 1
8 4 1 1
There! No ambiguity, right? Right! Unfortunately, all this coding does is represent the numerical quantities 1–4 (or 0–3) in binary notation, which leaves intact the problem of giving those undesired quantitative relationships to the categories.
Hence, the need for another coding scheme.
I will close with the caveat that the various coding schemes are more or less a matter or style (i.e. what does one want a specific $\beta$ to mean) unless one also includes interaction terms with the categories in the model. Then dummy coding will induce an artificial heteroscedasticity and bias the standard errors, so you would want to stick with effect coding in such a case (there may be other coding systems that keep one safe in that circumstance, but I am unfamiliar with them).