Text books don't generally explain why a particular case is used, thay just tell you what endings they take. This is why people have felt the need to write books like "English Grammar for Students of Russian" and even that is hard to fathom.