What is the purpose of this plate with door rail?
These pieces are frequently used for decoration now, but they were originally used for sliding doors, particularly on train sets. Here's one of the first uses from set 7838 in 1983:




While they could be used in structures, these were frequently used for putting doors on the train cars themselves:



These parts can also be used to create tracks for other things that need to slide as shown in Container Loading Crane (7823):



This class of part also has a 2xn variety that now allows whole 1xn bricks to slide within it:



This is useful for building sliding doors and walls that are a full module wide. Here's an example from 31009: