How do you a) counterfeit hardware, b) how does ebay used gear ends up in government server rooms?
Answer to A: Probably someone (a company somewhere) chassis that looked like Cisco chassis (or painted them to look like them), added hardware that operated as such, and then slapped a Cisco label or something. The product might indeed work as intended, but making it look like someone's brand makes it counterfeit.
And this is a problem, not only on stealing a trademark, but it also defraud users. When costumers buy a piece of hardware, there's an expectation that they will get regular updates (in particular security patches.) That would not work with a counterfeit piece. Things like this not only defraud the vendor, but also the unsuspecting customers.
Answer to B:: One way I can think of is that someone in procurement is/was on the fraud, or they were getting equipment from a that was on the fraud. Either scenario is unlikely. I cannot imagine a government employee, or a supplier to the government, being that dumb.
So, a more likely scenario is that the supplier (let's called it supplier A) in turn relied on other suppliers, some of them feeding counterfeit hardware. So, supplier A was either sloppy with verification, or it was being defrauded itself.
There can be a scenario where a low-importance government office was fine leasing, say, 2nd-hand hardware, which is fine as long as the hardware works, is legit, and is still under warranty. So this hypothetical office has lease contracts with supplier A which specializes in getting and leasing/reselling 2nd-hand hardware of a certain quality.
And then, repeating myself, either supplier A got sloppy with verification, or it was being defrauded, thus, passing the fraud up the government office, and thus, to Uncle Sam.
It's unlikely the original fraudsters were planning to directly defraud the mighty Uncle Sam, but Murphy and providence got in the way, fucking up the supplier, and thus fucking up the affected office, and then fucking up Uncle Sam, which triggered an investigation and opened the FAFO floodgates.
I could be wrong, completely, I'm just speculating :)