it't called discount window for historical reasons
discounting means buying treasuries at a slightly lower price - i.e. at a discount
window comes from the fact that these were sold at counter/teller windows at the bank
the discount rate is set higher or at the typical market rates to disincentivize its use
it's really meant to serve as an emergency lending source - only when other financing routes are exhausted: regular interbank markets, wholesale markets and SRF among others