Hi,
Bonjour is an older Apple Protocol for connecting Apple computers on a Local Network.
In addition the App previous to Messages that was called iChat had a Bonjour Account built in (you could decide to activate it or not). In the Original iChat the service was called Rendezvous but had changed it's name by Mac OS X 10.3 to Bonjour.
Whilst Bonjour shows Macs in the Shares in Finder and can also be the method used to find some Printers in Messages it only shows your Other Macs on your LAN when they are On and the person has Messages Open and the Bonjour Account enabled in either Messages or iChat.
So if you LAN was at the place where you work you could see up to 254 other people if they had Macs and were using Bonjour in their Messaging App.
If the potential people could be more than that then you would only see those of the particular Subnet you are in (anyone linked to the same Router as you).
The ID you see is basically their Short Name on their Computer (the name of their Logged in Mac User account in iChat or Messages).
IF you were testing between two of your Own Macs you can have issues if the Mac User Name is the same and the computer name (System Preferences > Sharing) is the same.
I have only seen Names in a Bonjour List. They do seem to added to the correct Address Card and display the full name.
Technically if added to iMessages the iPhone Number becomes an Apple ID. I could see that it might display a Number but I would expect it more likely to follow the ralphjohns@macbookpro format to name the person (I have a Mac User account on my MacBook Pro as ralphjohhns. I have another as Ralph on my Older G4 Tower still running iChat 4.8 (ralph@g4)
Jabber
Also known as XMPP
This is a protocol that is used over none centralised servers.
Anyone can run a Jabber Server and IDs are based similarly to emails as Username@Server name (With the exception of Google)
Apple included a Jabber server in Xserver that was initially Called iChat Server.
These different Servers, using the XMPP protocol can connect to each other.
Whilst not exhaustive this is a list of some servers (both Active and Inactive) https://www.jabberes.org/servers/
Google have been running a Jabber server (GoogleTalk originally) since Apple brought out iChat 3 in Mac OS X 10.4
https://en.wikipedia.org/wiki/IChat
Google broke away from the naming convention as Google.com and GMail.com were already handling Mail items.
They used the Server talk.google.com and in iChat you had to make this change to the server setting manually in the app.
By iChat 4 Apple had added a separate Google items for adding a Google account.
More recently Google have been using google.com as the server name and you have to set this in Sierra and High Sierra.
If people know my Google email address they also know my Jabber ID with Google.
That said I do not get any unsolicited calls via this service and I have been using it since 2004.
In Sierra and High Sierra the process of adding a Jabber/Google account is very specific to the point where it is different is each.
Sierra requires you set the Messages app "first" then go to System Preferences and then turn the Mail Option On there to use both Messages and Mail together to the two different servers.
In High Sierra you need to go to System Preferences and add a separate Google Messages account (Add Other and choose Messages then Google) as it can not be added as a option to Activate in the Google Account which you might be using for Mail.
That being said it seems a long way from from just turning it On.
I Do NOT use Google to Sync my Address Book (Contacts) with and this might be why I don't have potential Buddies being added to my Buddy List. I have in fact very few Google Mail contacts which might explain why i don't get all sorts of random people appearing to be added.
Jabber also requires that someone you try to Message also Accepts you as a Contact/Buddy.
This process used to have an ability to store those requests if you were initially Off line.
I don't know if this is still the case or how long such a request to be a Buddy lasts.
It might be that people know your email address with Google and have guessed you might use GoogleTalk or Hangouts and requests you to be a Buddy and they are now arriving all at once. However I think this is unlikely over an extended period of time - say over a week.
I would also have to check my Google settings to see if they can influence who can see you as being On line.
I hope that helps.

7:37 pm Wednesday; September 19, 2018
iMac 2.5Ghz i5 2011 (Sierra)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
iPhone 6 iOS 10.x and an iPad (2)