In The West Wing this policy is discussed at the start of Season 2, and it is discovered that whilst former presidents did this, Bartlett chose not to do it at the urging of Toby.
In House of Cards I don't believe it is discussed, but it is likely the President decided to not use a security canopy either by deciding it with his security team or because the production team didn't want to include it for whatever reason.
The West Wing discussed this in the opening episodes of Season 2.
From In the Shadow of Two Gunmen Part I. CJ is asked about it by a reporter:
ARTHUR In previous administrations the President entered and exited buildings
under a tent or canopy, the Secret Service wanting to limit visibility
in the open air. Can you tell me why these precautions weren't taken
for President Bartlet or at least not tonight?
C.J. It's policy not to comment on security procedures.
ARTHUR Well, C.J., if you can't answer the most straightforward
question then what can you tell us?
C.J. I'm sorry?
ARTHUR What do you know? What can you tell us?
C.J. has her hand on her neck and looks dazed.
C.J. [pause] There'll be another briefing in an hour and a half.
Hopefully we'll know more then.
Later in the episode, we see a conversation between Toby and CJ:
C.J. Yeah, it's where my necklace. Listen, Toby, I've been getting
some questions about the canopy the Secret Service used to use for
outdoor entrances and exits.
They stop walking.
TOBY Who asked you?
C.J. It was. Arthur Leeds, then a couple of others stopped me.
They start walking again.
C.J. We don't comment on security procedures.
C.J. So I don't think I'll have to answer that question.
TOBY I'll see you at the hospital.
C.J. walks away. Toby goes into the COMMUNICATIONS OFFICE.
We finally learn what all of this discussion is about towards the end of the follow-up episode, In the Shadow of Two Gunmen Part II:
TOBY C.J.'s starting to get some questions about why the President's
exit wasn't covered in Rosslyn.
RON The Secret Service doesn't comment on procedure.
TOBY Yeah. Ron, a few weeks after the President was sworn in, you got
a memo about his protection.
TOBY It said he wanted to enter and exit in the open air, and he
didn't like the feeling of traveling around in an armored tank.
TOBY Specifically, it said he wouldn't use the tent or the canopy
TOBY I wrote that memo, and the President signed it at my urging.
RON I know.
TOBY Ron, I don't think it's right that the Secret Service get blamed
for what happened last night, I want the Treasury Department to hand
over my memo to the Press.
RON No, we can't do that.
TOBY There are going to be a lot of questions.
RON There are always a lot of questions.
RON Don't worry about it, Toby.
TOBY It's not right. You're the guys - look at your hand.
RON My hand is fine.
TOBY Your hand is not fine.
TOBY Let me go over there and tell them it was my fault.
RON It wasn't your fault.
RON It wasn't your fault. It wasn't Gina's fault, it wasn't Charlie's
fault, it wasn't anybody's fault, Toby. It was an act of madmen. You
think a tent was going to stop them? We got the President in the car.
We got Zoey in the car. And at 150 yards, five stories up, the
shooters were down 9.2 seconds after the first shot was fired. I would
never let you not let me protect the President. You tell us you don't
like something, we figure out something else. It was an act of madmen.
Anyway, the Secret Service doesn't comment on procedure.
So it is clear that previous presidents did use a security canopy, but Barlett chose not to at the urging of Toby.
In House of Cards, I don't believe this is addressed, but it seems likely the President decided to not use a security canopy either by deciding it with his security team or because the production team didn't want to include it for whatever reason.