RAW - the curse should work. It's magic!
Going purely by RAW, the words are clear in that the curse causes the attack to target the cursed. No matter what. As quoted above, there is no case stated where it won't. It just does.
The magic of the curse extends beyond all the rules on targeting, other effects, range, etc. and as long as they are within 10' of the original target, they'll become the new target of the attack.
Bringing in other rules regarding, targeting, cover, etc. aren't necessary as the specific language of the curse overrides those general everyday rules and requirements.
But the RAW ruling has flaws and I'd like to suggest a more reasonable one
RAW creates a lot of other interaction issues that don't make sense
Let's say that Target B is actually inside, but at the edge Leomund's Tiny Hut and Target A is standing just outside of the Tiny Hut within 10' of them.
If we allow the curse to work as planned, then it would also bypass the specific rule of the hut preventing objects moving through it and that does not seem like the likely interaction.
Nor does it seem likely that 3/4 cover should be more beneficial than total cover as there is no penalty besides not a valid target for total cover.
Ruling the curse to work this way creates more issues than it solves and it's best to keep it simple rather than generate a slew of unintended consequences by allowing it.
The core question here is what happens to a ranged weapon attack that has an invalid target. The total cover rules state:
A target with total cover can't be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect.
So what's happening is The arrow initially targets creature A, but the curse wants to attract the missile, but it can't because creature B is not a valid target. By being an invalid target, the curse cannot come into effect.
Narrative common sense
I do agree that it seems like the Shield should draw the arrow to the wall and have it miss creature A. There is an optional rule for Hitting Cover that could present a case allowing this.
When a ranged attack misses a target that has cover, you can use this optional rule to determine whether the cover was struck by the attack.
First, determine whether the attack roll would have hit the protected target without the cover. If the attack roll falls within a range low enough to miss the target but high enough to strike the target if there had been no cover, the object used for cover is struck.
However, the problem here again is that Creature B is not a valid target, but if a DM wanted to rule that it draws the missile anyway and it hits the wall, I'd be okay with that. Rules as fun!