Knight Institute v. Trump was a First Amendment case. Because Donald Trump is only obligated to adhere to the First Amendment insofar as he is a government actor, the Knight Institute sued him in his official capacity, i.e., it sued the President of the United States, who at that time happened to be Donald Trump.
Therefore, a change in officeholder does not change the fact that the holder of the office is a party to the suit. Under the Rule 25(d) of the Federal Rules of Civil Procedure:
An action does not abate when a public officer who is a party in an official capacity dies, resigns, or otherwise ceases to hold office while the action is pending. The officer's successor is automatically substituted as a party.
This sort of thing is therefore incredibly common, as there are constantly countless lawsuits against high-ranking government officials who are subject removal and replacement at any time, especially around the time of a change in administration.
In case you're wondering, the party names were flipped when the case went to the Supreme Court because Trump was not technically filing an appeal, but rather filing a new lawsuit asking the Supreme Court to issue a writ of certiorari, which directs the lower court to send it a certified record of the case for review. Trump's petition is here.