As Twenty 20 indicates, discrimination within the workplace is not, per se, illegal.
An employer is free to discriminate on all sorts of grounds as long as they don't break the specific rules which apply to such things as gender, race, sexual orientation, age, etc.
The situation you describe sounds a little odd but there might be other factors which we've not been told about. For example, although your job doesn't involve driving, perhaps the promoted post was seen as a career step towards a higher post (such as regional manager) which would involve driving. (e.g. if the company was later seeking to promote an assistant manager up to the regional manager job, they'd be kicking themselves if they'd appointed an assistant manager who couldn't drive, So it would be reasonable not to offer an assistant manager post to someone who couldn't drive).
Chris