Hi Elizabeth,
The verb devoir in the imparfait, 'devait' doesn't always mean 'was supposed to' and in this context, it wouldn't make any sense. Here it is plain had to :
if you had said in a particular situation:
totally different tense (pluperfect) and meaning.
Hope this helps!