iPhone 5s connection priority (Wi-Fi / 4G)
You should check on the WiFi Assist feature of iOS 9 here. It's on by default, and many have complained about it.


  Turn Wi-Fi Assist on or off
  
  Wi-Fi Assist is on by default. If you don't want your iOS device to
  stay connected to the Internet when you have a poor Wi-Fi connection,
  you can disable Wi-Fi Assist. Go to Settings > Cellular. Then scroll
  down and tap Wi-Fi Assist.