That's what's often referred to as 'hold out' and is commonly caused by glue having soaked into the wood surface. In this case it looks like it could easily have been carpet adhesive.
I hate to be the bearer of bad news but the usual fix is to go back to bare wood (yes the entire surface, sorry) and stain again after you've checked that you've removed enough wood that you got below the adhesive contamination. You must check as it can take a surprisingly long time to scrape or sand deep enough even though it's only a fraction of a millimetre that is being removed*.
The way to test for hold out is to dampen the area with mineral spirits, if you haven't gone deep enough the areas where there is remaining glue will show up paler. You continue to work the surface until this test doesn't reveal pale patches.
*Most things don't soak into wood any deeper than this, including wood stains. So when the product says "penetrates deeply" on the can take that with a pinch of salt, it might mean 0.2mm versus 0.1mm!