Why did Vikings have a mast on their longboat?

If the wind was favourable, they could stop rowing and rest, while their single rectangular sail helped to carried their longboat along.