The compiler uses the
fpc_shortstr_concat helper function to copy the source strings into the destination string [in this context string means shortstring for brevity]. The destination string is passed to this function via a var parameter with a shortstring type, i.e. the compiler has to create a temporary variable of type shortstring (as Thaddy mentioned) which will take up 256 bytes of stack space.
To avoid this large temporary variable, consider using
move to copy the string fragments directly into the destination. This way there is no temporary variable at play, but the programmer has to handle a couple more responsibilities to ensure you don't unintentionally overwrite data, find the correct offset into the destination, ensure the destination is correctly sized, and update the string length after adding data. Basically re-implement the functionality of fpc_shortstr_concat, but without the use of a temporary variable.