Exactly this.
People think they are getting punished, like the bank doesn’t want you to take out another loan. The reality is that it is just an algorithm that sees major events like that and realizes that sometimes paying off a loan and immediately getting a new loan makes you more of a risk not less of one.
The score is a snapshot on a single day of how the algorithm thinks you could handle more credit than you currently have (it is used to apply for new credit), and if you paid off a loan and proceeded to walk into the bank days later to get right back into debt that is clearly/statistically a red flag.
The problem is people see the score like their current value as a person, but the score was designed for loan applications not for you to monitor month to month.
It’s not the bank trying to punish you it is just an algorithm that frankly has very limited data (no concept of assets, only sees statement balances, usually doesn’t include utilities/rent and many other bills) on your actual capability to pay off a loan.


Possible, especially because there are many different scores, I.e. I believe a car dealers often use a different score than say mortgage underwiters.
But I haven’t had a installment loan of any kind on my credit report for several years and my “average age of accounts” is still reported as excellent. Some revolving accounts in there, but my understanding was that closed accounts don’t leave your report for several years, and continue to count for your average age metric.
There is usually a small penalty for not having “enough types of credit” (if you are like me and don’t have any installment loans), but the reporting sites seem to say that it doesn’t affect the score much, and it took quite a while before they started reporting that as a problem.