It also can occur when there are legitimate concerns about safety due to known instances of drug use or child abuse. It is important to remember that the grandparent does have the responsibility in these cases to identify themselves as a potential custodial parent and to got to the courts and follow up on this to obtain their proper grandparents rights.
If grandparents can prove to the courts that their home offers adequate resources for raising a child then they will be strongly considered. Overall, grandparent custody is a generally preferred alternative in most every state to foster care.
The bottom line is that grandparents do have rights when it comes to custody and their grandchildren. The courts recognize them as an integral part of the family support system.