Illustrator doesn't have any real awareness of existing objects. At least nothing which is foolproof.
You can turn on Smart Guides via
View > Smart Guides. These will allow some snapping to objects and paths. However, smart guides tend to work with the cursor position rather than on objects bounds. What that means is when you are dragging it's the cursor which makes smart guides appear and snap, not the edge of the rectangle you are dragging. Does that make sense?
Perhaps the best way is to switch to Outline Mode by choosing
View > Outline from the menu. You can then see the edges of objects and ensure they align.
There are other options as well, like turning on the Grid (
View > Show Grid) and adjusting the grid's spacing via the Preferences. Or selecting individual anchors and using the Align Panel to align anchors, rather than whole objects.
Ultimately, for exact positioning, you just have to manually take care to align non-identical items.
In theory this is what smart guides were meant to do. But as of AI CS4, smart guides have been far less accurate and dependable. I don't know what the AI Dev Team did at CS4, but they kind of dummied-down smart guides with that release and haven't really addressed the lack of accuracy since then.