The behavior emerged through evolution and was encoded in the neurons by nature
What has been implemented in this robot has nothing to do with biological neurons of C. elegans.
The robot uses integrate-and-fire neurons. The "signal" sent from pre- to postsynaptic neuron is an integer equal to the number of connection between the neurons in the real worm. If the sum of input exceeds a threshold, the neuron "fires" (sidenote: right here's a bit of programming: how did the threshold values get chosen?).
C. elegans neurons do not "fire" (they are not spiking neurons and lack Na+ channels) but use calcium-based analog signals.
The body does matter too. C elegans has muscles on either side that it contracts alternately to move in a sinusoidal fashion. Not wheels. C elegans locomotion does not work like wheeled locomotion.
So, yes, you are right, C elegans neurons encode behaviour appropriate for a C elegans body given the biology of the neurons available here. None of this, however, makes it into this robot. An abstraction of the connectome does (C elegans has both electrical and chemical synapses; that distinction seems to be lost here too) and that's it.
It is kinda cool that the connectome does seem to naturally implement some basic response patterns; but given that muscles have been replaced by wheels, I'm not sure how meaningful that actually is.