This behavior is a result of current iOS software's aggressive power-saving strategy.
Current iOS devices will typically disassociate from their AP shortly after their screen has been deactivated. They will periodically wake up, re-associate, check for pending application-layer notifications, disassociate, and repeat the process. They will re-associate as soon as the screen is activated and will stay associated for the duration of screen activity.