🤗 Transformers doesn't automatically create an attention_mask to mask a padding token if it is provided because:

Some models don't have a padding token.
For some use-cases, users want a model to attend to a padding token.