It never occured to me that these situations were similar but you're absolutely right. That's what I always disliked about Kirk: he took unneccessary risks and endangered ship and crew all the time. Picard, Janeway and Sisco were much more sensible in that respect. (I have seen only season 1 of ENT, so, not knowing what came later, I refrain from judging on that series.)
I think the same attitude (bragging, oversized ego, lack of common sense, lack of a sense for reality and its risks, overestimating one's abilities) is also what causes most road accidents, particularly among young people who lack experience and self-discipline.
The problem is: the majority of these accidents could theoretically be prevented but can't in praxis because of the only boundless quantity in this universe: human idiocy.
While it's comperatively easy to get people to quit nasty habits it is rather a hopeless case to try and get them to think. A thoughtless and inconsiderate person is usually fully reason-proof.