I agree with "inattention to detail". Which to me is synonymous with "the dungeon element beat you".
"Bad luck", however, sounds suspiciously like "screwed by RNG", and that I don't agree with. The only reason I like dice rolling in combat is that the outcome is typically the result of a lot of dice rolls, so good and bad luck tend to balance out, and if the encounter is well-designed it's the player decisions that really matter.
But rolling a single d20 where N or greater means "you don't take any damage" and below N means "you take 1d8 damage"? That's just pointless, except maybe for the nostalgia value of playing the way we did in 1980.
To me there's always an element of luck in D&D, otherwise it wouldn't use dice. And if you're going to use enough dice rolls to in effect allow the bell curve to almost complately negate luck then why bother?
Yeah, hard disagree. If you look in the right place (or otherwise do the "right" thing, whatever that means and whatever the tells suggested) then in my game you find the trap. But searching takes time, and time is money, friend.
I also don't use dice rolls* when there's no consequence to failure, with stakes understood by the player. (And, no, failing to detect the trap is not a consequence of failure because you're still in the same state you were in before making the attempt.)
There's going to be times when there's no way the character can know the stakes, therefore IMO the player shouldn't either.
And here, even though you might be in the same state
right now on failing to find the trap you won't be in a moment when
bam! you set it off the hard way. In broader terms, sometimes there can be a very real consequence to failure only it arrives later, perhaps unexpectedly: this happened
here because you blew the roll back
there.
An example where these ideas would apply:
Party is sneaking into a palace intending to catch the Queen's Evil Vizier adviser asleep in his bed and knock him off. On their way in they pass a secret door hiding a passage that runs straight to the Vizier's chambers. Find it, and not only do they have a safe fast way in but they're also cutting off the Vizier's first-choice escape route. Miss it, and they have to get to the chambers the hard way through numerous guards and patrols, and also don't learn the Vizier has an escape route.
Neither the characters nor the players have any specific reason to search this particular spot for secret doors. They might search everywhere they go on the rationale "an old palace like this has to have secret passages", slowing their progress considerably, but this spot holds no special attraction.
Failing to find it (or not even looking) changes nothing now but potentially makes things much harder in the near-ish future.
How do you adjudicate that? Better yet, how do you adjudicate that without in any way hinting there might be more to this spot than meets the eye (i.e. without giving the players info the characters have no way of knowing)?
Confession: it's really hard to break decades of habit, so sometimes I still call for dice rolls for finding traps or knowing a fact or whatever. But I am constantly striving to get better at it.
Knowing a fact can be pretty random. There's a song I've known for 40 years or more but earlier today when I tried to remember which band had done it (which I've also known for 40+ years!) I drew a blank, to the point where I had to look it up. Any other day, odds are high to extreme I'd remember this without problem.