I run into the same problem on my hTC Desire 825. Suddenly, since yesterday the camera did not focus. I did not drop the mobile on the floor and did not expose it to blows!
I cleaned the lens, deleted the cache and the data from the camera app and it still doesn't focus. I don't know what else...