Little tiny groups are huge confidence builders and they sure make you look great in fron of other shooters, but think about it for a moment. If you can shoot a group, under stress, at 15 yards, that you can cover with both hands (that are COM), you will be able to handle (from a marksmanship perspective) 99.999% of all situations you could be faced with.
For experienced shooters, shooting a tight group at 15 yards is not hard. Doing it while adrenaline is pumping, hands are shaking, and the other guy(s) are shooting at you, that's not so easy. With practice the small groups will come. As long as you are practicing good habits and are striving to improve, be satisfied with what you have. You said you are a better shot with a rifle. Rifles are easier to shoot. You will, most likely, never have to engage a target past 25 yards with a pistol. If you have one past 25 yards you should probably have a rifle anyway. I know, anything can happen, so no one flame me. This is just a "most likely" scenario.
What other people are able to do could be a good goal to shoot for (no pun intended), but don't beat yourself up too bad about it if you are taking steps to get there. You just haven't gotten there yet - "yet" being the operative word.
The pen is mightier than the sword - unless you are facing a man armed with a sword, then the pen is pretty much useless. 45 Fu