I don't know why it bothers me that it's "dead" hair, because effectively nothing has changed. It's like a pseudo wig that isn't trying to hide anything, which is super cool
The moment your hair cells leave the pores on the skin of your head
Even before that. You pull a hair out, and if that specific hair follicle was still growing you should see a teeny-tiny bulb at the very end. That bulb can be up to a mm beneath the skin. The widest part of that bulb is where the hair cells begin dying and drying out. By the time it shrinks down to the width of the rest of the hair (and long before it emerges from the pore), all the cells in that section are dead. Only the base of the bulb has living, growing hair cells.
Well I'll have to look it up now, but I see it as a substance produced by the body that isn't made of cells itself. Like any of the other excretions and things the body makes.
Edit: apparently both your nails and hair are mostly made of keratin, but keratin isn't produced and excreted to produce the nail and hair structures like a playdough factory like I imagined. Special cells are produced that are primarily keratin and they are added to like a chain and die/harden as they are pushed out from the body.