so answering your question
Placing the ngIf directive on a component, or element, will, in fact, hide or show that element based on the expression you pass it to be evaluated. Once evaluated, Angular will simply add or remove your DOM nodes, mount or remount your components, from the DOM - as the expression changes.
for an example when your page loads in dom and angular js is been called angular knows checks that this div is not gonna be displayed so doesn't even render the content inside it
also when you check in your element debugger you can see that div is hidden showing the comment of your condition.
detailed