What makes psych wards keep patients longer?

My boyfriend has been in the psych ward for 3 days and has 2 days left. His mom was able to visit him today and he said he wanted to go home and she tried to take him home but they said they would call the dhr. When I went and my mom took me home all they did was call her to make sure I was in therapy. But his mom won’t risk it. I’m pretty sure she is not a us citizen so it is understandable. I’m just worried that they might try to keep him passed his 5 days that they already set if he talks about wanting to go home

He went because he’s been experiencing suicidal thoughts for a very long time. He told me he wanted to go the night before he went so I told his mom and she didn’t do anything until he went to the school counselor asking to go and that’s when his mom took him. So he voluntarily checked in which means he can leave, just with a call to the dhr

We are in Alabama, he is located in Birmingham 2 hours away from home of that helps with like the laws and stuff