A raised bed is better because you know what soil you're getting, you won't have to worry about weeds and it'll be easier to access but it's not a must-have. But don't make the mistake of putting them next to the house.

Anyone who works with foundations will tell you to never store anything directly against the side of a house.

If you insisted on putting a garden bed on the side of a house directly against the foundation you would need high quality water and vapor barriers. These barriers would need to expand past the bed due to unusual saturation of the area.

Now obviously you can put garden beds next to your house...and there is a way to do it without damaging the foundation but it is FAR more work than installing one away from your home.

The thing about gardens that are directly against a house is heat.

Because the house itself is a thermal mass, you may find that the garden bed stays warmer than other parts of the garden, especially if your house is made of brick.

This is a great thing in Winter, especially if you're growing something like a citrus, but in summer it will mean that you have to water more and mulch heavily as the beds will dry out more readily than other parts of the garden, and also may not receive as much rainfall under the eaves.

The other thing when you're planting directly against a brick structure is to remember that you'll get PH leach from the mortar between the bricks. This is no big thing if you're just doing standard vegie gardening but if you're planting something that's particularly PH sensitive (garlic, carrots, blueberries, flowing bushes like camellias etc) you'll have to watch your PH levels and occasionally even out the soil to keep it at the desired level.