The company has the right to determine who to employ, although there is legislation to provide access for people they are a private company who look for candidates they feel are suitable.
Popular job will receive large volumes of applications, and are only able to access and interview limited numbers.
If you were to provide interviews to all candidates this would cost vast sums of money and would be in no way beneficial.
Although companies should behave acceptably providing information to applicants before as to what they expect and should provide dignified responses to people who are unsuccessful.
Unfortunately without stating how they fobbed you off its difficult to say. Jobs in the railway are very popular and receive large number of applications.
At an assessment centre they use tests to segregate applicants, which is not in anyway uncommon. However they should avoid causing applicants any undue issues.