It is random and with 3 ads, there are 3 possible outcomes. You can think of it as a 3 sided die with ad 1 on one side, ad 2 on the second side and ad 3 on the third side. Every 10 seconds, the server rolls the die. The die might end up on the same side twice in a row (33% chance) which might make it seem like it didn't roll at all. If you scale this out to 10 ads (a 10 sided die), you only have a 10% chance that the die will end up on the same side twice in a row.