This is not the case. Some tag information can be written to the raw file, but not all. The rest of the information will be stored in the DAM's library / catalogue.
In Lightroom, edits and metadata are saved in the catalogue by default. You can choose for Lightroom to save them in an XMP sidecar file if you prefer. You may prefer this option as it you can keep the tag information close to the original file.
Aperture always saves any new information you add in the library by default. When you export a raw file (File > Export > Original) you have 3 metadata options:
1) Don't include IPTC
2) Include IPTC
3) Create IPTC4XMP sidecar file.
In Aperture, if you give a raw file a star rating and a colour label, export a duplicate of the raw file with "Include IPTC", and reimport. When you reimport it, only the star rating will remain. The colour label will be gone.
I'm not an expert on this subject, so can't give a thorough description of what can be written to the file and what cannot. I'm just trying to help explain that using tags is not a complete solution. It looks to me like the IPTC standard can perhaps be written to the raw file, but that other metadata cannot be? Also, using only tags and smart albums could quickly become a very limiting way to manage a large photo library.
One solution is to convert your raw files to DNG. DNG files do let you save metadata changes to the file itself, however there are other factors to consider which mean this probably won't suit everyone.
We need to be careful here; using "tags" is a bit of a misnomer (not people's fault; the naming conventions are a mess)
With images the proper name would be keywords; "tags" more properly refers to the tag ID and definition used by IPTC to store those keywords, which are themselves text (IPTC no. 25 I believe). "Tags" are also what OS X uses to refer to system tags on any file, not just image files, and these are stored in the filesystem's extended attributes. Similar concept, but VERY different.
Lr ALWAYS saves keyword metadata in its catalog. You have the option of writing (saving) that metadata to images in addition to that, not as an alternative to that. That info is stored in the image if it's say a TIFF or JPEG or DNG; it's stored as an XMP sidecar if it is a non-DNG RAW. Lr conforms to all the exif/IPTC conventions as far as storing metadata, and was the actual originator of the XMP standard to store metadata, which is sort of the modern ISO standard update to the IPTC system.
There is very little that can't be written into metadata and XMP. Indeed, with RAW files there is all kinds of stuff that's proprietary. They are sorta like containers, containing metadata and even JPEG previews.
But back to keywords. They are pretty much universal in that the IPTC has been using them for at least a couple decades, and most everything can read them. It was the press who needed that, as well as all the other IPTC data. It's super useful for passing info around, since you cannot do that with your Aperture or Lr databases. Take a photo of Messi scoring, you need that info with his name, number, team, location, and possibly keywords, caption, etc all available quickly and in a form your editors can use. Hence IPTC. A problem, however, is that not all applications can deal with hierarchical keywords.
If you think about it, your folders are simply a way to assign exclusive bits of info to your files. That's how a computer sees them. The path is really the same thing as a string of keywords, where order matters: "~/Pictures/2015/Vacation/Cancun/Fred" is the same as the keyword hieararch "~>Pictures>2015>Vacation>Cancun>Fred." And that would be the same as a folder hierarchy seen in Lr, or project/folder/album in Aperture. Info wise. If the hierarchy is flattened, it becomes conjunctive, at least in terms of finding things, although you lose the info the hierarchy imparts (crane as a subset of bird is more informative than "crane" and "bird" in the situation where you have a shot of a pelican keyworded "crane, bird" (bird>crane means crane the bird; bird, crane means crane and bird).
Using keywords, thus, can impart all your virtual organization to the files themselves. As well as any information that can be described as text. Indeed, it's what is recommended by Apple for importing the info about star ratings into Photos from iPhoto. You can do the same with labels, picks, etc etc etc.