Mantras come from the fantasy of puthujjanas that sensual objects will purify their citta, which is very idiotic.
For instance the hindus have their Om sound and they say a sound will get them to nirvana.
The Buddhists have heard that samadhi is about the lack of hindrances, for instance lack of doubt, and as usual with people infatuated with sensuality, they claim that when they fix an object, like a word or some visual mantra like a kasina, the hindrances stop and therefore whatever samadhi they get from that is the samadhi that the buddha teaches.
So they say that when they repeat buddho buddho buddho for a long time, they do not have doubt, therefore the citta is purified like the buddha says.
As usual with puthujjanas they create secret stuff and they applied this to mantras so they even have secret mantras.
You can view the first tetrad of the breath mediation as the mantra, but the breath mediation is not about watching the breath, contrary to what some buddhists say, but about calming and killing some sankharas which is a lot of work.