The couple of paragraphs before それでかあさんのコキリさんが、 高い木をえらんで鈴をとりつけたというわけなのです, explains that Kiki is technically very good at flying but she’s very absent-minded and when she loses concentration thinking about tweenager issues like getting pimples or what she’s wearing, she slowly starts flying lower and is prone to collisions. So when that happens, her feet brushes by the tops of the trees and the bells sound, which reminds her to course correct!