It seems that a lot of people commenting did not read the whole article. The developer committed four internal repos to DJI's public Github: 'spray-system', 'Management-platform', 'real_time_serve_v1' and 'real_time_serve'. These repos contained a wide variety of secret keys. So it does seem that this was intentional. Even playing devil's advocate because many large companies, Facebook, Google, etc, have systems to mirror part of their internal repos to GitHub, but I can imagine that adding a new path is checked and double checked by multiple people. Also this wasn't just a mistake of one repo, it was four.
I'm making no comment on if the punishment fit the crime, just that by reading the article it does seem that this was very much intentional.