Typically in all cars there are certain switches on the pedals depending on the model and the accessories in the car. The brake pedal switch is a standard feature in all modern cars because it is used to be triggered when the brake pedal is pressed.
This switch is adjustable like the brake pedal height in the car. It is quite common after such job to be needed adjusting. I'm pretty sure you will find out how you can adjust it in your car, since you did brake master cylinder replacement on your own. After you finish, you need to have all 3 pedals on the same height, and the switch to be triggered after you slightly press the brake pedal.