Crazy reason for building a railway engine (10)
I believe the answer is:
locomotive
'a railway engine' is the definition.
(I've seen this before)
'crazy reason' is the wordplay.
'crazy' becomes 'loco' (loco can informally mean mad).
'reason' becomes 'motive' (I've seen this in another clue).
'loco'+'motive'='LOCOMOTIVE'
'for building' acts as a link.
(Other definitions for locomotive that I've seen before include "one's attached to the train" , "Able to move by oneself" , "Railway engine" , "Rocket, perhaps" , "for moving from place to place" .)