air travel – Why does one sometimes have to go through two subsequent security gates at El Alto International Airport (LPB, La Paz, Bolivia)?

I took a flight from El Alto International Airport (LPB, La Paz, Bolivia) to Alejandro Velasco Astete Airport (CUZ, Cusco, Peru), and passengers for this flight (boarding gate R20) were required to go through two security gates that directly followed each other, while for some other flights passengers didn’t have to go through the second security gate.

Why does one sometimes have to go through two subsequent security gates at El Alto International Airport (LPB, Lima, Peru)?

That seemed redundant as the second security gate was only scanning the passengers’ luggage while the first security gate was scanning passengers’ luggage and bodies, but I’m assuming there is a good reason for it. The second security gate didn’t require passengers to remove anything from the luggage before the scan.