Lethal or not, that’s sure going to slow you down if you try to go up the stairs. Either from getting non-fatally jabbed, or out of sheer fucking caution after that thing pops down next to your head, which achieves the goal.
Something like that’s not intended to kill you, so the resident can continue sleeping and clean up your corpse in the am, it’s intended to stop or slow you enough for the resident to make an effective escape.