It absolutely was. The 2 plays before that the 49ers were struggling to get anything. Shanahan, having his finger on the pulse pf his team, chose right. Take the points. Momentum is so important in football and analytics doesn't account for it at all.
49ers are moving the ball and getting points while Dallas has only been able to muster 1 good drive.