It seems to me that the semantics are different: you return the security deposit ~at handover time, while last month's rent is counted as rent for the last month of the stay, so the tenant "gets it back" (in the form of not having to pay rent they'd otherwise have to pay) a month before they move out. Do I misunderstand something?