I've read that modern aircraft don't need spark plugs like conventional aircraft do, as the jet fuel autoignites once it's mixed with the hot air exiting from the compressors. Then why do aircraft like the Airbus A320 still have 2 igniters in the combustion chamber, to ignite the air fuel mixture?
Jet fuel will not self-ignite when starting a modern turbine engine.
This article from the WingMag Aviation Magazine says:
As the temperature isn’t quite sufficient to initiate self-ignition (the autoignition temperature of aviation fuel is around 220 degrees Celsius), spark plugs are arranged around the combustion chamber. They generate a spark that ignites the air-fuel mixture and the turbine now drives the fan and compressor through a shaft, as described above. The exhaust gas temperatures begin to rise and the engine will now keep “running” as long as there is a supply of aviation fuel. The igniters are switched off by the FADEC once the exhaust gas reaches a certain temperature because they are no longer needed.
Once the engine is running at a sufficiently high speed, the autoignition temperature can be sustained (same article):
[The fuel] is injected into the combustion chamber through several “fuel nozzles” where it can self-ignite and continue to run if the temperatures are sufficiently high.
Igniters are not only needed for a cold start. They are also used in case of an engine flameout. From the Boeing 747-8 FCOM (7.20.8 - Engine System Description, emphasis mine):
An auto-relight capability is provided for flameout and rollback protection. Whenever the EEC detects an engine flamout or rollback, both igniters are activated. A flameout is detected when a rapid decrease in N2 occurs. A rollback is detected when N2 falls below idle RPM or compressor pressure falls below idle minimums.
Note that this is for a modern jet engine, the General Electric GEnx.
The autoignition temperature of kerosene is 428F. The temperature coming out of the last stage is usually above that at moderate power settings, up to 7-800 F or more at takeoff thrust. However the temperature has dropped somewhat by the time the air gets to the fuel nozzle, and in heavy rain there may be superheated water cooling things down some more, and also when the engine flames out it cools off rapidly as the compressor rpm decays. And during start the discharge temperature doesn't get hot enough until after it's running.
So for starting at any temperature you need the igniters, and for relights if there has been any time to cool down you need the igniters. Theoretically, at moderate to high power settings, if the flame went out it would auto-relight immediately if the fuel was still there or was immediately restored (you'd get a big ITT/TIT spike), but what normally happens is it flames out, say due to rain or something, and things cool off enough that the igniters are needed to get it going again.
Or at least there is a high probability that the igniters will be needed to light off. So pretty much all modern engines have igniters that come on automatically following a flameout, and if not, you are supposed to operate with continuous ignition in heavy rain and extreme turbulence.
those are to help the fuel ignite during a cold start, when all the components in the hot section are at ambient temperature and there exist no flames in the burner cans. And as pointed out by Jan Hudec, the start motor (if the engine has one) or the APU (if it does not) cannot spin the compressor fast enough to heat the air to the point where the injected fuel will autoignite.
The easiest way to understand this is by comparison to a piston 4 cycle engine: In the piston engine the 4 cycles occur in the same location, but at different times. I.e. the combustion cycle gives way to the exhaust cycle as the fuel is burned up and pushed out the exhaust valve. On each subsequent cycle the fuel air mixture must be ignited again.
Contrast this with a turbine engine where each of the 4 cycles occurs simultaneously, but at different locations in the engine. In other words, the burner section is burning continuously and the igniters are only needed to light it at the start, or to relight if the flame blows out.
Think of it like a propane or natural gas stove or torch: You need a spark to light the flame initially, but the need for a spark goes away as long as the flame stays burning.