This is sometimes referred to as caramelizing. You will notice it happening from sweetened liquids far quicker than ones that aren't. When juice travels up the wick to the coil, it is vaporized and some of the left over residues will intermix with juice in the tank. When I vape my DIY stuff, it doesn't really happen to me. When I vape one of my favorite all days, which is sweetened, it happens almost every time. Chain vaping (which I tend to do) exacerbates this while the occasional puff, set device down, puff will prolong the life of the fluid in the tank. The wick material is also a big factor. The better the fluid travels up and down the wick, the more it mixes in the tank.
Juice darkening in the bottle over time happens with steeping. Not exactly sure what causes it. My best guess is oxidation. The two are not really related though, just my experience.