Apart from any other reasons there might be, it makes the code more readable and helps to prevent errors.
Your two examples are not equivalent, because you forgot to release the newly alloc/init'ed
array in the second one. You would have needed
self.userInfo = [[[NSArray alloc] initWithObjects:@"Info", nil] autorelease];
here.
QED first reason ;-P
Moreover, when you create a local variable first, you can build up more complex objects before publicizing them via a property. If, for example, you were using a mutable array here and filled it with some more complex logic, assigning it to the property right away and only when going on filling it up, clients of your class might access the property with its contents being only half ready – a great provision for sporadic and hard to reproduce bugs.
So even though in your case it would not have been strictly necessary to use a local variable (if you either had autorelease
'd it our used the new Automatic Reference Couting "ARC", which would have solved the leak issue automatically), in my opinion it is always a good idea to first get everything ready and then make it visible.
Clean code rules :)