That's the shift-brake interlock, which prevents you from shifting out of park unless you step on the brake first. The switch that the brake pedal contacts when pressed can bend or stop functioning, or the solenoid which actually releases the lock can stop functioning. Check the switch by the pedal first, since it is the easier one to replace.
If it is the solenoid, that will require the cover of the steering column to come off at the least. But, the workaround you are using will work for now, just remember to keep your foot on the brake when shifting out of park :)