Glad the car is running better.
I cannot guess as to why the two vacuum lines were disconnected - and if it was deliberate then they should have been plugged, as having them open compromises other vacuum systems.
But there's very few good reasons to unplug these - only one I can think of is to diagnose the system - but you would the re-connect them after the diagnosis...
And as for a BMW workshop that would run tests like cylinder balance etc. and not pick this simple issue up....? Lets just say that this is a public forum, so I'll keep my comments to myself...!