Let me point out, that Trump has and has had secret service all day every day. They have had the virus as well. If Trump were in the hospital or in his car, there are still secret service there. There are about 80 people in the white house each day. So there are no more or less secret service for trump as he goes in his car to the fans outside the hospital.
And it was not just a stunt. Trump did it to make the press look stupid by saying he was worse off than he was. Trump has been on camera every day. The press can see how well he is. And yet there are some in the liberal press saying he is at deaths door. Or that he is not well enough to be president. And then he goes out and waves to his supporters. And they look stupid.
It also probably required all of 10 minutes total for them to be in the car together.