Why are my if/else statements in page.html.twig ignored?
I would check, if the page render-array contains the element sidebar_first. You can do this with 

{{ dump( page|keys) }} 

in your page.html.twig (or use devels kint function for that). The |keys filter will prevent you from memory overflow if your page is big.

If this is the case, then your template is ok and you don't have to look at twig, but to search, what else is in the render array and where it could be originated.