I've found that there are a variety of things, but some of those that I noticed are:
- warmth
- smell of milk (on baby and baby's clothes, crib, stroller - everywhere you've fed the baby)
- The spaces made for babies are just the right size for cats to curl up and sleep, and generally warmly padded
- It appears that cats notice the lack of attention, and so hang out where things (ie, baby) get attention (don't know if cats feel jealousy, but the appearance of jealousy is there)
- Generally cats I've had like to be where people are - they are very social. Babies sleep a lot, and cats sleep a lot, so part of it may be sleeping with another creature that is warm and sleeps when the other humans don't.
But a newborn can't breathe with the weight or a cat on their chest, and doesn't have the strength to turn over, move the cat, etc if the cat gets in the way of the infant's face. So for the first few weeks we train the cat that the baby sleeping areas are off limits, and when the baby is not sleeping he is always within sight of an adult, so we don't worry about it otherwise. Now that our youngest is nearly 2, he tackles the cat, etc and he can handle the cat, but, of course, the cat is still trained not to enter the sleeping areas, even though we'd be ok with it now.
But then, we have an awesome cat, so, you know, my advice may not apply to every other cat situation.
I wouldn't allow a stray near my baby for the simple reason that I don't know what disease and/or bugs the thing may transfer, and even a small scratch can turn into a major infection depending on what the cat has been tracking through recently.