Why object keys hide the type mismatch
When you build a plain-object dictionary from a sheet, getValues() hands you a 2D array of native JavaScript values. A cell containing 1042 arrives as the number 1042, not the string '1042'. When you write obj[rows[i][0]] = rows[i][1], JavaScript silently coerces that numeric key to a string on write, because object keys are always strings internally. That coercion makes it look like the lookup will work.
The mismatch surfaces on the read side. A form submit or a doGet handler delivers every query parameter as a string, so e.parameter.id is always '1042'. When you do obj[e.parameter.id], JavaScript looks for the string key '1042' and finds it because both sides coerced. Accidental parity. The first time I hit this, it was a CSV import where some IDs were stored as plain numbers and others as text-formatted numbers; half the lookups broke silently because the object's coercion behavior was inconsistent across the two source shapes.
Map.get() uses the SameValueZero algorithm, which does not coerce. map.get(1042) and map.get('1042') are two different lookups and the wrong one returns undefined with no warning. That strictness is exactly what you want, but only after you normalize both sides explicitly.