When you see output as @{this=that;those=these}, or something similar, it’s because you’ve taken multiple objects (a collection) and tried to convert them all to a single string. That formatting is just how PowerShell deals with that situation.
In your original, it’s because you were selecting the BaseName property of multiple objects. That’s always a collection of objects. In your revision, you used ForEach-Object to go through them one at a time. So rather than converting the collection to a single string (which PowerShell can’t really do all that well), it converts a single object to a single string (which it does just fine).