Can you explain TrainingArguments for max_steps vs num_train_epochs?

I had setup for num_train_epochs=2 and then increase max_steps to 10, it looks like did 10 epochs. According to definition max_steps is " the total number of training steps to perform and overrides num_train_epochs". Why are we setting both as TrainingArguments? This is confusing to me.