Hamilton takes two points away from a Hockenheim race that had ended in misery, extending his championship lead over Valtteri Bottas to 41 points after the Finn crashed out.
Kubica has finished most races in 2019 as the last man to cross the line, but he scores Williams' first point of a difficult campaign.
It is the Pole's first point-scoring finish since the 2010 Abu Dhabi Grand Prix, his last race before suffering life-altering injuries in a rally crash which had kept him away from F1 racing until this year.
Alfa were punished after "the time that it took for the torque to align with the torque demand" recorded on Raikkonen and Giovinazzi's cars at the race start were found to exceed that permitted by the FIA.
The punishment in-race would have been a 10-second stop-and-go penalty, which is converted to a 30-second sanction per FIA rules.
As Raikkonen and Giovinazzi finished seventh and eighth respectively, they drop out of the top 10 altogether, although Alfa has submitted an intent to appeal the decision, according to Autosport, giving the team 96 hours to ponder their next move.
Hamilton had looked set to win the race from pole after leading the race for 30 laps, but a costly spin shortly after apparent main rival Charles Leclerc had crashed out set in motion a chain of events that had the reigning champion in last place at one point, before he recovered to 11th at the chequered flag.
GPFans is a multi-platform, multi-language brand dedicated to Formula One coverage. We bring you all the ins and outs of the sport, 24/7, everything from up-to-the-minute news and features to the latest viral stories and clips.
We believe that a new generation of exciting, outspoken drivers will make F1 more popular than ever before, and we want to give our users access to as much of their heroes as possible, on and off the track. From Lewis Hamilton to Max Verstappen, Daniel Ricciardo to Sebastian Vettel, we provide in-depth analysis of every every Grand Prix in the season, from Australia to Abu Dhabi.
With Formula One under the new ownership of Liberty Media, how the sport is being covered is evolving, and GPFans will look to be at the heart of this progression into new media, as one of the fastest-growing sites covering the king of motorsports.