Have very occasionally given non-good reference (while you say nothing bad about them - you say nothing good either... as an employer you get to recognise those when you get 'em.)
Have very occasionally had to say "I have no idea who this person is - can you get them to remind me who they are?". In reality I strongly suspect that these people had a fictitious CV.
Have once given a (genuine) excellent reference followed by "You should probably not be asking me this question when they still work here" ;-)
In reality you very rarely get asked for references for somebody you wouldn't recommend. The employee knows that the reference won't be glowing, so they don't put you down.
Basically - I never lie, but I very occasionally don't tell the whole truth.
Also I've pretty never had somebody who I would consider a bad employee. The worst usually have to deal with is somebody we hired for the wrong job, or they'd outgrown the company, etc. I've never had somebody steal the petty cash and set a client on fire ;-)
This reluctance to provide any substantive reference often results in references just being "yes this person worked here from this date to this other date".
My first retail job was at Sports Direct, one of the worst companies I've ever worked at, and I've worked at some terrible companies. I worked there for two years and bad a bit of a falling out with one of the managers. I handed in my notice, worked it, and a month after leaving I was given a written warning for not turning up to work, and I got in a pretty big argument with that manager over the phone.
The manager from Game asked my friend, who worked with me at Sports Direct, about the reference, and he said it was total bullshit. Still, with the bad reference, I couldn't be hired. Thankfully, once I knew what was causing the problem I simply left Sports Direct off of my CV and the offers came flooding in. I worked one more retail job and then started landing coding jobs.
What you say is correct. Every company I've worked at has declined to give a reference to very poor staff members. However, in some industries I reckon bad references happen a lot more than we'd like to think. Having seen first-hand what a bad reference can do I would never give a bad one, and even when asked by someone who I worked with who I knew was not a great co-worker I gave a reference.
I try to stay honest, though not by identifying negatives when they are there but rather by highlighting strengths and areas of improvement. This is in fact the way I like to see it anyways, and I openly guide those people directly also using exactly the same feedback.