I assume the light arrives from the n1 layer.

The second thin layer (n3=1) is sandwiched between two layers of greater refractive index, so it acts like a Fabry-Perot interferometer (etalon).  As you change its thickness, it alternates between high transmission and high reflection.  In its transmitting state, there is very little reflection back into the n2 layer, and so not much absorption.  When the n4 material is absent, there is strong reflection at the n2/n3 boundary, putting light back into n2 to be absorbed a second time.  When n4 is present, the reflection at n3/n4 can interfere destructively with that from n2/n3, reducing the energy that goes back into the absorbing n2 layer.  I suggest that you study the simpler case of two interfaces - which is mathematically easy but still gives surprising results.

The problem in the question is sufficiently complicated that you don't get the right answer by just plugging in the conditions for a simple two-surface Fabry-Perot etalon (lambda/4) - you need a detailed calculation as the the questioner has done.