In order to develop Android proficiently you need to understand the lifecycles (Elements of Life). This is a basic feature of the system and mastering it is key.
When you rotate your device the system manager destroys its activity as well as all the fragments and elements, saves the current state (basically the visual characteristics) and reconstructs everything from scratch. That's why your LogCats are always displayed again.
This means that in this process you will lose any referrals that have not been properly saved . I recommend that you study the lifecycles a lot, especially the Activities and Fragments, because they are slightly different.
Follow a lifecycle diagram of an activity to get an idea.
I recommend that you read this document here . It's in English, but it's FUNDAMENTAL to understand the android system.
Good luck =)