Well there are 'begging dogs' that are rented, and then there are pets engaged in 'earning', and then there are canine friends found on the streets, who learn this is what my person wants.
IME, there are one's to be concerned about, but most are fine.
Some trained begging dogs have quite ordinary housed owners who train them, and rent them out, partly to pay for their upkeep. Some are very careful about who they rent to, some less so. (the latter usually eventually lose the dog for it)
How they're initially trained is as good and bad as standard owners. Some train well through love and attention, some badly through anger or fear..
For many it's just a routine, and for some one they're rewarded for before and after,, for others it's just what they are used to, and they really want to go stretch their legs. (owners will usually let them get up and wander, or play with them, renters usually don't)
For most dogs, lying down a lot of the day out doors, smelling the world, and meeting new people, is vastly preferable to doing the same thing without the people and smells, while stuck indoors going nowhere.
A beggar can act, as if 'it's my best mate' the dog even if ok enough, will swiftly show that's not the case if it doesn't appreciate who it's with.
Drugged or sedated 'begging dogs' (as opposed to homeless with pets begging) would be highly unusual and raise suspicions and action from the homeless communities. Scared ones, that aren't being re acclimatized and socialized by someone who's taken them on in that state, get noticed. No one likes it.
Homeless folks dogs are often highly empathic and often giving a level of 'canine therapy' to many human friends.
Giving away your best mate: It's one thing to try to decide to desperately rehome your cute little likeable Pomeranian or spaniel, when life fails, rather than go onto the streets together and put them at risk.
It's quite another when it's your wrong side of middle age, halitosis ridden, slobbery, abscess tending, Pitti/Rottie etc cross that will easily end up briefly in a shelter before being put down as poor chances of adoption. Or your mad chaotic, LBD that destroys and chews everything and gaily thinks house training's for humans,
You'll find the majority of the chaotic and barely able to care for themselves, will center everything around their dogs. For some it is their entire world, reason for living, their very best and often only, friend. The dog knows, and they form the routine of begging together.in harmony.
Dogs at encampments make friends and care about most of the neighbors too.
Just as with standard owners, some will sometimes fail to seek treatment when they think something is part of age, but once someone pushes them to get a street vets opinion, will get stuck into treating them, and go without to do it.
Most have incredibly strong bonds, and any time spent with them and their dogs will soon tell you who is who. Street dogs have no more desire to have their person taken away, than the other way round, even though they're often highly social with groups of others and can be cared for in emergencies.
Homeless dog meet homeless new mate: Sometimes a literal stray, sometimes substance abuse leads to either being given away, left behind or lost, and adopted by someone more sorted. Sadly some are because the homeless owner dies and the dog is taken on by someone who knew them. These dogs can look depressed and low energy for several months. They aren't drugged, they're grieving, and often the new owner is too.
IME for a majority of dogs actually living homeless, it's a not bad life, with a lot less rules, way more freedom to do canine things, and a lot of walking and exploring involved, when not earning with their mate, and being fussed.
(Street vets will generally check for microchips by the way, and free micro-chipping is available)