Here's why:
* Obelisk's Effect: Obelisk's effect prevents your opponent from attacking directly, but it doesn't restrict your ability to activate cards.
* Magic and Trap Cards: These are separate card types that are activated by their own conditions, not by your monster's effects.
Example: You have Obelisk on your field, your opponent has a monster, and you have a "Torrential Tribute" Trap card in your hand. You can activate "Torrential Tribute" to destroy all monsters on the field, including your own Obelisk.
In short, Obelisk's effect doesn't interfere with your ability to use Magic and Trap Cards. You're free to activate them as usual.