How to describe the state of a locked door
‘门上了锁’ is correct. 

I think you can best understand '上' here as 'put, set'.

Here there are 16 different definitions for 上：
8，11，13 and 14 approach the meaning here.

门上了锁 door set lock = the door has been locked = the door is locked

If there is a padlock on a door, it is also locked. (padlock is 挂锁）

'门上了锁。' could mean 'There is a padlock on the door.' or 'The door is locked.' or 'The door has been locked.' or even '(someone) put a padlock on the door.' depending on context.

'房门上锁是为了防盗。' was translated: 'The doors were padlocked to prevent theft.' 

都可以：

门锁了。The door is locked. / There is a padlock on the door.
门被锁了.
门上了锁。
门锁上了。
门（被）上锁了。   

*门（被）锁了上。 【不好】