There are some parts to your question:
- Part 1: The highest temperature is achieved with a air-fuel-ratio below 1.
- Part 2: The temperature limit of available materials cooling processes is even lower.
- Part 3: Given an upper temperature limit the thermodynamic-cycle of a jet-engine can only deliver more power by re-heating the exhaust-gases.
- Part 4: Every design-process is a trade-off between multiple factors. For the after-burner two factors are efficiency and complexity of the engine.
Part 1: Combustion Reactions
Depending on the air-fuel-ratio the combustion-temperature will vary.
The following figure shows the relation. Observe that the maximum power (think temperature) is not achieved for a air-fuel-ratio of 1 (, i.e. stoichiometric combustion, $\lambda = 1$). This is due to dissociation of the combustion products.

Part 2: Temperature Limit of Materials
Due to the high mechanical loads on the rotating turbine parts (aero- and centrifugal-loads) the maximum allowable temperature is below the theoretical maximum limit. The following figure shows the how the development of new materials did allow for higher temperatures in the jet-engine1.

Part 3: Thermodynamic Cycle
The basic (idealised) thermodynamic cycle of a jet-engine is called Brayton-Cycle. The following figure shows this cycle.
The enthalpy-difference between state 5 and 6 is what is converted into thrust. Given the temperature limits the only way to increase the power output of the thermodynamic cycle (vertical distance between state 5 and 6) is to re-heat the turbine-exhaust.
Observe that the temperature limit for stationary parts is higher, this is also due to the lower operating hours of the after-burner.
Part 4: Engineering considerations, trade-offs
Usually the additional thrust produced by the after-burner is not needed throughout the whole mission. Therefore it is acceptable to sacrifice efficiency for mechanical simplicity.
The shown EJ-200 also show the engine stations. It is easily seen the difference in mechanical complexity between stations 4-5 and stations 5-6.
Conclusion:
But why is not possible to design jet engines that burn more oxygen instead of adding another separate component, the afterburner?
It is theoretical possible to design an engine which would burn all oxygen. However, until now this was not necessary.
Why do jet engines only burn about a half of the oxygen ingested?
Because fuel is burned for maximum heat not to deplete oxygen. The maximum temperature is limited by material and dissociation.
[1]: engineering.virginia.edu