So the community manager in question here actually posts on Reddit, in fact most of that was swiped from Reddit LOL
End result, it is sort of random, the CM admits to not knowing everything, and when he first came out and said it wasn't, he didn't have all the information because he is a CM not a Developer.
Here is what happens. The Devs have a group of tables with all the weapons and armor listed on it by source. They can choose what tables Xur has access to for selling things, but once they point it at that table its random. This is how RNG in pretty much every MMO ever has handled things.
Regardless, that dude has some great posts on Reddit.