In today's world, we cannot think of any application without concurrency. From network requests, to database/file access, to performing some calculations/computations in the background, concurrency is everywhere.
When dealing with concurrency, we need to make sure that our programs are thread-safe. Immutability is a great help, in that regard.
By default, functional codes are thread-safe, as they encourage immutability. So, what is immutability? If you go by the dictionary, when something is immutable, it is unchangeable; in programming, it refers to a variable that will always hold the same value after initialization. Thus, if the variable's value is not changing, it's automatically thread-safe.