Yes, but many times companies will pull unmitigated dick moves and give you 2 weeks, no benefits. By comparison, even 1/3 the stated number of weeks is decent (especially for junior employees).
Still, it’s a cautionary reninder to negotiate significant severance benefits.