Flame temperature at peak in the cylinder is over 4,000 F.
We use aluminum pistons to transfer that heat out of the system.
The cooling water around the cylinder and head is also there to prevent meltdown.
By the time the exhaust gasses reach the EGT it has cooled off considerably.
It is only one of the tools in your tuning box and is an indicator of what is going on inside the engine. As Harold pointed out, stochiometric is that point where every fuel and air molecule are paired up and maximum temperature is reached. Impossible inside an engine, but your particular engine will still have a maximum temperature at that engines best air/fuel mix point.
If you increase fuel you will have a richer mixture and the temperature will go down. If you decrease fuel you will have a leaner mixture and the temperature will go down. It is very important to know in advance where on the curve you are operating.
If you are burning fuel in the exhaust the temperature will go up and has nothing to do with engine operation.
So what does the EGT tell you? Dyno runs and time with the system will allow you to log the EGT over time and then you can use it to spot problems.