“At the end of every seven years you must make a release.” In this context, the seventh year was a fixed time, and tracked by the priests. So as the year of release approached people were less likely to lend because they would be less likely to be fully repaid. While that makes monetary sense, it was not God’s heart and He reproves it. The poor need the money (or whatever they borrow) now, not in a couple years when a new cycle of seven beings, and God says He will bless Israel if they will take care of the people.
The seventh year was different for cases where a person was forced (often by debt) to serve another. In those cases, the guilty party did serve seven years (cp. Deut. 15:12).