RCA takes your money first before you earn income! Is this legal?

www.cbc.ca/news/canada/nova-scotia/income-tax-federal-tax-instalment-payments-cra-letter-1.5715800