I guess I took the sudo from this openHAB 2 configuration tutorial. But it does not explain why to use sudo.