The Pentax K-5 is no worse or no better than any other camera I've used and the problems occur in the same situations as with other cameras. Wide apertures and fast motordrives are a particular recipe for error. Slight forward or back focusing at f/1.4 is a big problem, whereas at f/11 it wouldn't be noticeable. Some of the problems however are caused by camera operation. Pressing the shutter can cause a slight change of angle of the camera, and many cameras are programmed to re-focus when the shot is taken. At something like f/1.4 this can be enough to shift the focus.
Another problem is expecting the camera to know what you want to focus on. Multi-spot AF systems often choose what to focus on from a set of common picture situations, and if your particular image doesn't fit, the AF will just do its own thing.
In the example below an AF system will often focus on the background, and it can be very difficult to get certain AF systems to lock on to something like this.