Some cats simply will not stay inside. My wife and I once "adopted" a stray cat. He was very affectionate, and started approaching us when we were out on the deck. He would come inside, stay the night, but when he wanted to leave, he would leave. We even had him neutered in an attempt to try to keep him inside. He spent a lot of time in the house, and would always come back; though it might be a day or two before we saw him again (he may have had several families he stayed with). We had him around for 5 or 6 years before he never came back one day.
We have an indoor cat now that has always been an indoor cat. But the feral ones sometimes will not allow themselves to become 100% domesticated.
Yes, had one that limped home on 3 legs a couple of times, tended to want to be a house cat until he could walk normally, then back out to the wild. Came in covered with ice one winter night. Thawed out, ate some food, then he wanted right back out.
I know how the story is likely to end - we have coyotes and bobcats in the subdivision - but he's happy and has an easy life until then.
I have 2 indoor cats that never go outside and one outdoor cat that refuses to come inside.