I don't know if this is what happened to you, but what I've found in TMO/RSRDC is that when I get to within 2000-2500 yards of the merchant, they start zig-zagging. I've begun taking 2500-3000 yard shots just to stop this. I've lost track of how many times I've set up my shot using the radar, gotten well ahead of the target and submerged to lie in wait, been having the sonar man follow the closest target, only to have them start weaving when they get to that 2000 yard distance mark. Most of the time, though, they only vary by 300-400 yards to each side of their course, though.
If you're running RSRDC, the other possibility is bad luck, which I've also had a bunch of. The ship routes in RSRDC zig-zag naturally, and at least a dozen times I've set up for a ship/convoy/task force, only to have them hit one of those points and veer off in a new direction right
before reaching the firing point!