For example, the dollar coin series that began in in 2007 will include Ronald Reagen, deceased, but not Jimmy Carter who is of course still living.
It's the law. The Women on 20s campaign expands that the requirement is 2 years dead, but the Treasury FAQ is less specific.
Are you wondering why that law was made?
From my understanding, one of the few (only?) instances of a living, non-royalty, non-head of state on a country's currency was Sir Edmund Hillary on NZ's 5$ note.