Not saying they are doing this, but what you're describing used to happen with shady registrars. It was called "domain tasting"[1] where there was a loophole path for registrars to squat a domain for a short period of time. That allowed them to dynamically sense interest in a domain, squat it, and mark up the price.
I'd be very surprised if a big name like Namecheap were doing that today though. Probably just a coincidence that someone else bought it while you were deciding.