When the server logs a bson object containing BinData (at least of type 0 such as the lsid.uid field), the hex encoded value is not quoted:
{ lsid: { id: UUID("445f7935-6df6-492e-b078-00e030e4ffea"), uid: BinData(0, E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855) } }
That (extended) json cannot be fed back into the shell.
For comparison, the shell does output the BinData with quotes:
config> db.system.sessions.find().pretty() { "_id" : { "id" : UUID("eef34f2c-612f-475d-846b-67b221f0081c"), "uid" : BinData(0,"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=") }, "lastUse" : ISODate("2021-04-29T14:24:06.339Z") }
I also expect that outputting hex encoded BinData instead of base64 encoded BinData would also be a problem for round tripping with the shell? Maybe this was an intentional decision and not an oversight, but it's certainly useful for development to be able to paste the server output into a the javascript mongo shell.