Because garters do produce a venom (albeit a very mild one) and elapids (Elapidae) are a family of snakes, which contains such members as cobras, mambas, taipans, kraits and many others, all of which have round pupils and they produce some of the most potent venoms.

So, in short, it's pretty much just because of how things have turned out.

Often vertical pupils are a sign of a nocturnal lifestyle, but not always. If you have a look at boas and pythons (nonvenomous), you'll notice that they often have vertical pupils as well.