What is the logic of 'inactivity' used in monthly settlement?

Here What is a quarterly settlement or running account settlement? it says

funds are transferred back to the primary bank account once a month if the client is inactive for 30 calendar days.

I traded almost everyday in September, last on 27th September.
And still my entire account balance was transferred back to my bank on 4th October.

What does ‘inactive for 30 calendar days’ mean then?

The settlement that happened on October 4th was a quarterly settlement, it is mandatory as per SEBI regulations. Whether you have traded or not, any unused funds in your trading account will be transferred during the quarterly settlement process.

Quarterly settlement is done on the first Friday of each quarter, January, April, July, and October.