As suggested, I'll convert my comment to an answer. Given this format however, I reckon a list makes more sense. So let's see how the move 5.f4 changes the position:
- 5.f4 is a slow move that wastes time for white in a line where White already invested a tempo on 3.e5.
- 5.f4 makes it easier for Black to develop their knight on g8 via h6, from where it lands on a great square on f5.
- 5.f4 weakens the diagonal g1-a7, making it more difficult for White's king to find safety.
So, to answer your question: White played 5.f4 in the game you linked because White wasn't a very strong player, not because 5.f4 was a good move. While it doesn't lose the game for White, it makes Black's game far easier, and White will be the one who has to solve some serious opening problems if Black knows how to turn the screws.
The best move in the position is the main line, 5.Nf3. This move defends d4 and develops White's knight. It also lets White retain control of the e3 square, which means that White's dark-squared bishop has a safe square on e3 to develop to.