I disagree that it was out of character. Walt is arrogant, and while cautious he's also an amateur criminal as pointed out many times through out the series. This is why Saul was able to easily find him in Season 2 Episode 8 where he confronts him in his classroom and tells him
if I can find you, how far behind can the cops be? And also a big part of why Mike hates him so much. He's arrogant and reckless.
Walt even confesses outright to Hank in Season 3 Episode 1 that he has half a million in cash.
Hank: Jeez, what do you got in there, cinder blocks?
Walt: Half a million in cash.
Hank: That's the spirit.
There are plenty of other moments throughout the series which build Walt's character as someone who is yes smart and cautious, but also very arrogant and reckless and its not much of a leap to assume that he might keep the book in his bathroom where others might see it.