I'll give a bit more clarity to this.
https://studentaid.ed.gov/sa/repay-loans/forgiveness-cancellation/public-service
The idea is to keep as many people out of default and possible. My wife use to work for a student loan collection company and getting people back off default is virtually impossible.
It was designed to help support non profits and teachers, and unfortunately government workers (I'm sure government workers was the main group because why should someone who gets paid, on average 15% more for the exact same job (outside of the Engineering and Medical Fields) have to pay back their loan.
Only thing I am confused about is that this particular program started in 2007 and only payments made after that date counted so I am not sure how your friend got things paid off in 2016 since there are not 120 monthly payments between 2007 and 2016. It sounds more like how Iowa was setup in the past. If you are in a high need area or an income poor school district there is loan forgiveness for working in those area.
The way to manipulate it:
1) Get on Income Contingent Repayment (Basically the government can only take 15% of your income to repay a loan. 2) Make 120 monthly payments while being employed for at least 30 hours by one employer and your loan gets forgiven, tax free. There is a whole department and specific loan organization that controls those loans and tracks things for you.
The more honest way to approach it:
I approached mine as a I did my 30 year fixed mortgage. Get on both things so that the minimum payment is manageable in case you are out of a job, but while employed put in double payments or the full payment and your loan is typically gone in 10 years anyway, This way if life kicks you in the pants you have a fall back and don't default or don't have to go into forbearance (which just drags out how long you owe the government). Next year is my 10 year mark and although I won't have all my loans paid off, the forgiven amount is going to be $1500ish. However, that is because I did have 2 months where I straight up wasn't making any money, and being able to put together $200 was much easier than putting together $700 when we were in an extreme pinch.
That said, I do have co-workers who are going to hit 10 years and they had $70K of loans, were paying income contingent minimums which barely covered interest. Next June, the government is going to write off $70K because they were working full time and made all 120 payments. Tax free.
Side note: If you are on ICR for 25 years, the loan is also forgiven but in that situation the forgiven amount is taxed so it is more like settlement.