This would also be the same, because although 'speed' is given twice, when you use #, the value is taken from the right.
d1 $ speed 5 # sound "bd" # speed 2
The next one would also be the same. There are two events on the right, but with #, the rhythm comes from the bd on the left. That bd starts at the start of the cycle, when the 2 of speed is active, so you end up with a single bd with a speed of 2.
d1 $ sound "bd" # speed "2 5"
The $ does something quite different from #. The # is combining the sound "bd" and speed "2" patterns into a single pattern. The $ is just there to make sure everything it 'worked out' on its right, before being passed to d1 to be sent to superdirt.
I talk about combining patterns with # and friends here: