Because the ruling quite literally says that anything the president does as the president is presumed to have immunity unless the prosecution can argue that applying criminal law couldn’t possibly impact on the core work of the office of the president, and that their motivation for doing what they do can’t be considered when making that determination.
“As the president” Trump asked the justice department to falsely claim it had discovered election fraud as part of a plot to steal the election.
The supreme Court ruled that this is protected because if you ignore his motivation, punishing the president for consulting with the justice department about election fraud would clearly impede the core functions of the office.
Without considering motivation, would punishing the president for transporting documents he has legal access to to a place he’s allowed to take them impact impact the function of the office?