The whole free agent issue stems from the way rookie contracts are structured.
A guy is drafted out of college or high school, the club has 5 years to call the player up to the Majors. At that point the player is on a 6 year contract, receiving the league minimum ($535k in 2017) for 3 years, and then they allowed to file for arbitration with their club. At this point each party submits what they feel is a reasonable salary for the coming season, and third party selects which of the two offers is better.
For each year of their remaining contract the player has to file for arbitration. What this amounts to is players being paid the minimum for 3 years and a competitive market salary for 3 years. Only then are they able to go to negotiate a new contract with their club or as free agent. At this point, most the players are in their mid to late 20s, at the peak of their career and trying to get contracts based on current performance, not potential.
But what this has done is incentive teams to off-load the large contracts that veterans and superstars have been receiving over the years in favor of young prospects. Teams like the Cubs and Astros have proven that building through the minor leagues can win pennants, so why open up the pocketbook and pay for a veteran, when you can trade for a bunch of minor league kids, suck for a few years, and try to capitalize on potential all at once.
If players were able to negotiate new contracts after 4 or 5 years, or enter arbitration after 2 years (kind of exists already with the Super 2 rule), that would help force GMs to stop relying so heavily on stockpiling the minor leagues. At the same time, there needs to be a concession in how free agent contracts are structured, so we see fewer of these 6+ year contracts that go beyond a players peak years.