To answer your question: there have been many reports in these forums (and elsewhere) of K-5 AF issues. You can use search and read. I do not think there is general agreement if it's user error or real issues of K-5. Personally I am convinced that although quite often the problems can be attributed to user error, there are real issues with K-5 AF.
Possible solutions: use AF fine-tuning (available in K-5 menu), send your lens/camera for adjustment, use manual focusing, use Live view mode, be extra careful in tough lighting conditions and when focusing on small objects. All of this helps but may not be enough to eliminate misfocusing 100%.
Issues that have been reported:
- software bug when AF fine adjustment is not active even though it is set in the menu
https://www.pentaxforums.com/forums/115-pentax-k-5/230976-af-fine-adjustment-...ml#post2445845
- front-focusing in low tungsten light when focusing on slightly reddish subjects (like skin) - see analysis by Falk Lumo.
- inconsistent behaviour with some lenses (front or back- focusing or even both at different focal lengths)
- it has been speculated that the central focusing area is too big on K-5 which makes it hrs to focus on small objects (like eyes) surrounded by other objects
Once in a while I grow really frustrated with K-5 mis-focusing. All the workarounds and adjustments do help, but it is quite annoying the amount of effort you have to put into it. I have found that when I am shooting regularly and a lot, focusing improves because you get used to being careful and knowing limitations and workarounds, when I shoot less, I start to forget and the mis-focusing become bigger an issue