I don't want to Monday Morning Quarterback you here, but it sounds like you were jerking the trigger and causing your shots to go wide. I have no problem getting very tight groups out of either of our M&P compacts. Granted, the trigger on these guns is a little gritty at first but it does smooth out with use... and really shines if you have a competent gunsmith smooth it out for you.
Besides, a compact handgun shouldn't be considered for sharpshooting. If you're wanting accuracy, get a 5" bbl single-action. As long as the compact can put it's bullets into a man-sized target at 10 yds or less, I'd say it is doing the job it was intended to do. But most of them are capable of being way more accurate than that; the M&P included.