From what Muslims in other parts of the country have said, it was one of your leading prophets (I guess it was the prophet Abraham or Ishmael.. don't remember) who was asked by god to sacrifice his son as an example to prove infinite devotion to god. When he passed his test of ultimate devotion to god, god replaced his son with the goat and the goat was sacrificed instead.
You have got most of the story right but have arrived at the completely wrong conclusion. I don't blame you because even many Muslims don't get it right either.
The prophet in question was Abraham (AS). He was issueless. So when Ismail was born he was overjoyed. To test his faith Allah ordered him to sacrifice him to see what he loved the most. This son in Christian/Jewish traditions is said to be Isaac (who was the father of
Jacob / Israel (AS)). So when he decided to sacrifice Ismael AS Allah had already accepted his act because of his intentions. Their Allah stopped him and ordered him to sacrifice a sheep/goat instead.
The story is a reminder to muslims (and other Abrahmic religons) that should be ready to sacrifice anything in the name of Allah especially if they hold that particular thing very dear. If they do so they will get a even better reward. The luxuries and provisions of this life are temporary. One should constantly strive to seek the pleasure of Allah even it means he as to let go of things he holds dear.
And how did Allah reward Abrahim AS for this act? He was made a father of nations. A once issueless person is made a spiritual father of three of the worlds major religions.
This sacrifice of an animal is actually a reencatment of Hazrat Abraham's own sacrifice and an annual reminder to all muslims that they too should be ready if the time comes
Where does that tell you that god would order the killing of a goat?
So is Diwali all about lighting candles and fireworks? How many people care to think that Divali is actually a celebration of light over darkness?