It is totally random and it is not going to have anything that would be related to goodwill or anything like that. It's purely regards to randomization and nothing more, every provably fair gambling game out there has that randomizer in their system and that ends up being one of the most important ones, so it is going to end up being an important part of it. I realize that it is not that easy, but it should definitely be considered one of the few important parts of it without a doubt.
I guess that there are some people who wanted to see something beneath all of that, but it doesn't really have it, it's gamblers fallacy and nothing more than that, so having that type of understanding would not help you at all if you look further.
The standard system of a casino has no external interference from outside source like Op claims. Casino machines have been designated to work alongside the house edge, as you mentioned. The arrival of a good result can't be predicted, but things may occur differently, and the winner will accept that his friend influenced the result. However, it'll sound weird to other listeners, including the appreciated person. Those thoughts erupt in form of joy, and happiness tagged to similar reaction we had on the arrival of a friend.
But the gambler fails to forget the days he lost money, and other times when he won without the presence of his friend. People believe different things and don't care what others will say regarding their belief. Yet, looking at gambling in a more sincere perspective, nothing works adequately, like it may have been painted by other gamblers. Hence, discussing this as a proven fact, the process needs to be tried repeatedly, again and again, you'd notice the whole belief will end up as false.