This was a must make play. They got their fastest receiver on the 49ers LB. As soon as Dak saw that matchup he had to know that is where he was going but like you said, he threw the ball where no one could catch it. But he had him open again later in the game and he overthrew him by 5 yards and it was intercepted.
Purdy doesn't have a strong arm yet somehow teh 49ers manage to get him plays where he throws it 25 yards downfield, hits his receivers in stride and let's them pick up another 20 yards with their legs.