I believe Walther and H&K are in constant competition to one-up each other as far as designs and features in their polymer pistols.
I think it started when Walther released their first polymer pistol in 1997, the P99. Walther contracted Cesare Morini,
Morini Competition - Products , an Italian Olympic pistol grip designer to design the grip of the P99, and Walther was the manufacturer who created the idea of replaceable backstraps in polymer pistols. Before the P99 came out, ergonomics didn't seem to be a main focus to polymer pistol manufacturers, as all the others felt like blocks in my hands before then, IMO.
In 2001, H&K released their first P-series pistol, the P2000, which IMO, looked a lot like a P99, and also used a more ergonomic grip than their USP-series pistols. The P2000 also used replaceable backstraps, like the P99, to help the shooter get a more customizable and comfortable grip on the pistol.
In 2006, H&K released the P30. Like Walther did with the P99, H&K outsourced the grip design of this pistol, and in the P30's case, it was outsourced to Karl Nill, which also makes world class Olympic pistol grips as shown in their website here:
Nill Griffe - News , to create the grip of the P30. H&K also took the adjustable polymer grip designs one step further than Walther did, and added the option of replaceable side panels to this pistol.
In 2008, Walther updated the grip of the P99 when they made the newer P99Q and P99D pistols, and these pistols use the same grip that Walther put on the PPQ, which was released in 2011.
The PPQ and P99 use the same shapes on the frontstrap and backstrap of the grip. The difference between the grips of these two pistols is that Walther made the sides of the grip more rounded, and IMO, more comfortable with the grip on the PPQ. They also improved the texture of the grip, and made the PPQ grip more aggressive and made it stick to the hand easier than with the P99. I don't believe Walther just flat out copied the grip of the P30, since the P99 and PPQ grips are so similar, but I do believe the release of the P30 forced Walther to update the grip design of the P99 to give them an advantage when competing with H&K to win contracts.
If you don't believe me, pick up a P99 and PPQ in both hands and I believe you will see and feel the resemblance. Personally, I am happy that these two manufacturers are competing with each other, as they seem to keep improving their pistol product lines to give them an upper hand when competing, and as a result, we keep getting improved designs because of this.
As far as I'm concerned, the grip is the main similarity between the P30 and the PPQ. The internals are completely different, with one being hammer-fired and the other being striker-fired.