Sometimes the government may be changing its position as to a point of law because of an underlying change in policy. That’s inherent in democratic, deliberative government.
Sometimes it’s that the government has a hard time speaking with one voice. The Department of Justice tries to maintain uniformity, but at the trial court level, there are probably thousands of cases being litigated by hundreds of lawyers (some specialists, some generalists) over the entire range of federal law. There will inevitably be some discrepancies. There is more central control at the appellate level, but at the Supreme Court, the Solicitor General’s authority to speak for the United States is exclusive, so that office gets to decide when the position taken by some other office of DOJ was wrong.
The government changing its position does not itself change the law. A court still gets the final say. The procedural change described in the article you linked was about which court re-reviews the case first in light of the SG’s confession of error, the Supreme Court or the trial court.