> If you're writing that theorem: Assuming you remember to include it in your premises.
No, you're missing the point. If you're writing that theorem, either (1) you will have to include that premise, and anyone who depends on you will have to satisfy it; or (2) the theorem is true regardless of what happens when you divide by zero, and nobody who depends on you will care. At no point can the division behavior hide something that comes back to bite you.
Mathlib includes theorems of both these types. For an example in a space I've been working with, you can compute the cardinality of a type with Nat.card. This returns a natural number, which is convenient, but since there is no infinitely large natural number, the value of Nat.card for an infinite set is 0.
If you care about the difference, you need ENat.card, which takes different values for empty and infinite types. But you usually won't want to do this, because the value of ENat.card is an extended natural rather than a natural, which makes it a huge pain to work with.
There are several theorems related to Nat.card which take advantage of the dummy "infinite" value of 0 to prove a theorem that is true regardless of what the cardinality might actually be, and omit any premise related to it (which would have taken the form "the type is finite", "the type is uninhabited", or "the type is infinite"). The advantage of doing things that way is that you don't have to detour into the extended naturals, and the validity of your proof is unaffected.
Consider Nat.card_prod, which says that
Nat.card (α × β) = Nat.card α * Nat.card β
When α and β are both finite, this says exactly what you'd expect.
In the case that α is infinite, Nat.card α will be zero, and therefore the product Nat.card α * Nat.card β will also be zero. It happens that when (α × β) is infinite, Nat.card (α × β) is zero (by definition), so this theorem is correct. The reasoning isn't something you'd want to repeat in those terms in an oral exam, but there are no mistakes, and the stated theorem is true.
> If lean had defined division to have a nonzero denominator
This would be an absolute nightmare.