If the “house” (or the for loop) is sold and gone, it’s not an asset and the cost of the goods sold — salaries included - is an expense.
If the “house” (or the for loop) is kept and used, it’s an asset and the cost of producing the asset — salaries included - is capitalized.
(There are differences betweeen the “house” and the for loop but not at the extremes which are clear. I imagine by “house” you mean some building that makes sense in a commercial or industrial context like a warehouse.)
A factory worker building a product to be sold is capitalized into inventory
The key thing here is that while you generally are expected to and allowed to consider a produced good an asset, it's not assumed that paying someone salary translates immediately into an asset... unless it's software under this new rule for some reason
Look into when this started and why and you might understand it