Ok, well it's something that many people have a difficult time understanding and it's going to outcome determinative in the scenario you provided. Let me give you a couple of examples of how it comes into play.
(1) Let's say my local public school district required every elementary student to recite the Lord's prayer every morning or face suspension. That practice is clearly unconstitutional per U.S. Supreme Court
opinions. Let's say I'm an atheist and I want to sue to make them stop. If I don't attend the school or have a child that attends the school, my lawsuit would be thrown out because I do not have standing.
(2) Here's a scenario that is a little more applicable. Say I stash some drugs in my friend's house. The police conduct an illegal search of his house and find my drugs. They have evidence linking me to the drugs so charge me with constructively possessing the drugs. I cannot successfully object to the search of my friend's house no matter how illegal it was, and it does not matter that the evidence that was illegally seized is being used against me.
In your scenario, if something improper or illegal was done to secure the attendance of a witness, it was the witness's rights that were violated and they are the only person who can object to it. The defendant lacks standing to challenge a violation of the witness's rights.
Hope that makes sense. I realize it's contrary to what most non-lawyers believe.