It wasn't made up and then given a role. The role came first. The developers noticed players weren't realizing that the test chamber revolved around using that one block, so they added the hearts and the name and the rest.
To answer the question, not really... but pretending to was fun. But I was kind of punched when GLaDOS says, in the battle, "I invited your best friend the Companion Cube. Too bad he couldn't come because you, murdered him."