Drain tube?
That is actually an air pickup tube to provide some cooling from the front of the car.
They do have foam around the connection points which deteriorates. Not really important. The foam realistically was likely there for reducing noise due to the plastic parts rattling against each other then acting as a seal. If it bothers you just put some tape or similar around it.
If you look closely you will also have a second vent that directs the air out of the battery box towards the alternator.
When a battery leaks in a NC it juts makes a big mess anyway all under the tray onto the steel rail as the tray has multiple hols in it.
See this link.
Sort of talks about it all.
https://forum.miata.net/vb/showthread.php?t=666011