Anakin was just doing what idiocy teenagers do. He was surrounded by older, more responsible people who should have been there for him when he needed them. The whole mess at the end of Episode 3 would never have happened if there was anyone in the Jedi order he could have actually confided in and received non-judgemental support.
For that matter, he probably would never have ended up with Padme if he had anyone he could really talk to about his feelings. Obi-Wan may have been ready to be a Jedi, but he was in no way ready to be a mentor. He treated Anakin like a friend rather than a padawan, and so didn’t take full responsibility for him.