There are few practical uses for this spell effect. You can cast Fenrick's Doorjam (Magicka:1) repeatedly to increase your Alteration ability - a container is not required for success and/or skill improvement.

You can use Lock to trap pursuers or to keep out potential witnesses from a room if you plan to commit a crime there (theft or murder). This is only applicable on interior doors, not doors which go into a different cell, as NPCs in Morrowind are incapable of using doors which go into a different cell anyway (unless they are following you, in which case they come with you immediately and can't be locked out, and in any case will not attack you). Since NPCs are incapable of picking locks and never cast Open spells, a very weak Lock spell (even 1 point) is just as effective as a stronger one for this purpose, and much easier to cast. The spell you can purchase, Fenrick's Doorjam, costs the minimum of magicka and should therefore be the only Lock spell you ever need.

You can also use it to practice your Security skill by repeatedly locking and picking the same lock. Note that lockpicking an owned container or door is considered a crime, even on a container that is not locked by default. Thus you should try to do this only where there are no potential witnesses (other than followers, who don't seem to mind).

Containers or doors that you Lock and unlock will permanently carry the "unlocked" notice on them.

You can lock almost any container, including sacks and barrels.

It is possible to become permanently stuck by locking a door which you cannot unlock.

If you cast Lock on an already-locked object, and your spell's magnitude is higher than the lock's current level, the lock's level will change to your spell's magnitude. However, if your Lock spell's magnitude is lower, the lock will not change. Thus, you can't replace a lock with a weaker lock to make it easier to unlock.