It's helpful to take a holistic view of this business. OP's link to one of the answer on this site is pretty good albeit brief.
Your lender originates your first mortgage, and then sell it to some financial institutions, who might hold it or package it with other mortgages and sell the pool by pieces (securitized). All these transactions were priced with the market information such as interest rates (and the expectation of future rates) back then.
Now rates have unexpectedly dropped. This raises the value of all the existing mortgages, and benefits the buyers. However, without a prepayment penalty, from your perspective as the mortgagor, you have the option to prepay the mortgage and basically "buy it back" from whoever owns the mortgage now at the face value. (Of course you would fund that purchase with another mortgage, i.e. refinance, at a more favorable rate, and thus at a lower cost).
Essentially this is a call option that moved in the money and it makes all the sense for you to exercise this option. The buyers though certainly wouldn't like it as they are missing the opportunity to make more money (at the then interest rate vs. the currently lower rate). But keep in mind that investors in this business are all sophisticated institutions. They know the embedded options and the risk associated. In fact they often assumes a fixed percentage of mortgage would be prepaid no matter what. So all the "losses" are just a cost of business that they already baked into the assumptions and prices they charge and pay each other.
Still, you can see why lenders would prefer you don't refinance, and can set up the terms to try to steer you away (e.g. prepayment penalty). But I'm not sure how docking the loan officers' pay would help, other than incentivizing them to lie about refinance (as one of the comments pointed out). We see that a lot in car dealership too when they tell people you can't refinance in the first XX days.
But certainly in your case, you shouldn't feel responsible for the awkward position that the lender put their LO in.