I've had similar wrong-bin-in-stockpile issues before. It used to generally be when a bin was 'claimed' for one stockpile after a job to move it to a different stockpile had already been created (or after jobs to store things in it had been created), so the Block bin in the Ammo stockpile would still be labelled with the Block stockpile's number. In my recent fort (v 31.19->...->31.25), however, I've had a couple times when a bin was in the wrong stockpile, and labelled as 'belonging' there, ie a Gem bin in a Armor stockpile, numbered to match the Armor stockpile. The dwarves don't take items out of the misplaced bin, either (ie they don't move gems in that Gem bin to an actual gem stockpile, they leave them in the misassigned Gem bin). You can 'fix' it by getting the bin out of the stockpile and disconnected from it (I used k-d to dump it, but leave the contents alone, and then k-c reclaimed it from the garbage zone) and letting the dwarves re-figure out where to put it, but I don't have any idea what causes it in the first place.
Have had it happen tons when using the 'take from other stockpile' option, where the dwarves seem to sometimes ignore restrictions on what the receiving stockpile is set to accept, but I'm assuming that's more of an issue with take-from or with the stockpile restrictions, rather than part of the bin-in-wrong-stockpile issue. Mostly had this with trying to segregate adamantine cloth/thread from the rest of my cloth/thread, but have seen it with other stockpile types (refuse and ammo especially) as well.