Sorry if this question is dumb, but I'm trying to understand where my logic is faulty above. Or, if that logic is correct, and I, for example, bought and sold the same stock at the same 1 cent spread between ask and bid without movement, then I'm repeatedly losing a penny, but then who is getting that penny and how did they get it.

It seems like I should be able to quickly buy at the $4.995 mark in this scenario (half $4.99 and half $5.00) and then sell at the $5.005 mark (half at $5 and half at $5.01) - or something similar? I just want to understand how that could be accomplished.