Lamellar Bodies
The barrier is often described as bricks and mortar: corneocytes set in lipid. The mortar is not secreted as a finished material. It is assembled inside the living cells below, packed into lamellar bodies — vesicles carrying glucosylceramides, phospholipids and cholesterol along with the enzymes that will process them — and released into the gap between the last living layer and the first dead one.
Once outside, those enzymes convert the precursors into the final mix, principally ceramides, cholesterol and free fatty acids, which then stack into the layered sheets that make the barrier water-resistant. The processing step matters: the precursors themselves would not do the job, and the enzymes need water and an acidic pH to work, which is one of the reasons a raised surface pH shows up as a weakened barrier.
Production responds to demand. Stripping the barrier — with a harsh cleanser, a solvent or tape — triggers a rapid release of stored lamellar bodies followed by increased synthesis, and this repair cycle takes hours to days depending on the damage and the age of the skin.
It also explains why a moisturiser is a stopgap rather than a repair. Applied lipids sit on top and slow water loss; the barrier is rebuilt from underneath by cells doing this work on their own schedule. What topical products can do is stop interrupting it.