I don't follow your argument. A public office was offered in return for money. Almost all politicians above the level of the local church council run for office for personal gain, even if the gain is the power that the office lets them wield. Ergo, an increased likelihood of being re-elected due to securing additional campaign funding through selling the senatorial seat to the highest bidder is personal gain. Not that that matters. The power to appoint does not come with the power to extract "fees" for an appointment.
The sentence is appropriate as a deterrence to the practice in the future. The danger to the political system is quite clear. Incumbency is an enormous advantage in an election. And, in theory, accepting such a practice could allow an ongoing system where, if a senator's popularity is wearing thin in a party's key state, the senator resigns at the halfway point in the term and the governor appoints a more savory replacement from the party so that the party is more likely to retain the seat through the next election.
The tolerance of political chicanery enables the creation of political machines that subvert and twist the entire election process. Like gerrymandering and election dirty tricks, just because something is done on a regular basis by political parties does not mean that it isn't harmful to the political system. At least we are not shooting folks for doing these things " to encourage the others", as the French said of execution of soldiers in the Great War..