Why does this JavaScript innerHTML XSS?

Why does this JavaScript innerHTML XSS from user content. The JavaScript code assigns user input to innerHTML. In JavaScript this executes any script in the string.

#whatswrongwiththisjavascriptcode #javascriptbug #javascriptproductionbug #javascriptdebugging #javascriptbackend #javascriptcodereview #javascriptsecurity #javascriptperformance #javascriptreliability #javascriptapi #javascriptengineering #java...

https://www.youtube.com/watch?v=aFzeh_Cc33E

Why does this JavaScript innerHTML XSS? #javascriptxss

YouTube