One of the 24 questions in this topic
It happens when you check out a commit hash. New commits will not belong to any branch unless you create one.