Hi
It is not necessary to encode it to base64 but it is a good practice if the binary data needs to be stored and transferred to ensure that the data remains intact without modification during transport.
Imagine that we generate the salt with a utility that is in a machine X at the moment of creating a user and that when we are going to save the user in the database we have to transmit it by the network calling a REST or SOAP service (it is not the most advisable but to give an example).
It is also practical to test it, it is always easier to compare and it is more readable for the developer a text string than a set of bytes.