There are lots of 'coils' in any tractor. Every relay IS a 'coil', every solenoid is a 'coil', every length of wire IS a 'coil'(though very,very low in value). That ECU may have 'coils' connected to every I/O pin ( connection ).
You get the 'spike' when the electrons race from battery to the 'other end' (whatever that is )
How big a 'spike' depends on several factors like length of wire ,actual current flow and 'device' it's going to.
The big problem is not knowing what is actually connected when the battery is attached. ideally nothing, but modern vehicles have radios,alarm systems, GPS, etc. that are powered 24/7. Though they may not draw a lot of current they will create a 'spike' when battery is connected.
I don't know what is 'live' on your machine, though the wiring diagram will show. It gets complicated with OPC modules, engine kill solenoids and other equipment. All of the 'electronics' today is a sealed 'black box' so information is not available.
Bottom line... swapping a battery should NOT have fried the ECU.