The Botafumeiro ceremony is always at the end of the Mass, after the priest's final blessing. In the beginning, many years ago, the ceremony was appropriately placed at the front-end of the sacrifice of the Mass. But, control was promptly lost as too many folks were, evidently, not there for the main reason of the Mass - the Mass - but to see the Botafumeiro.
So, at some point, the Archbishop decided to move the ceremony to the conclusion of the Mass. This allowed those whose primary purpose for being there to depart, while others remained to observe and film the Botafumeiro ceremony.
Hope this helps.
Tom