The latter is more portable, while the former only works on systems where /bin/bash exists (or is symlinked appropriately).
Test servers are implemented by docker containers and run real servers for rclone to test against.