Does buying a new mac also get you Lion on your Apple ID? When you buy a new mac, the iLife apps are redeemed with App Store validation codes which means you can upgrade/install iLife 11 on your other macs. (Assuming you have fewer than the current store limit of 5 macs connected to your store Apple ID and the software requirements are met).

Does this also apply to Lion? 

I would presume no since the linked MacWorld article clearly only mentions iLife. I'm mostly interested in how the App Store is working and this appears to be a new function where it's allowing a programatic access to an asset that also is being sold under the normal store terms of redemption code or direct payment.
No. The copy of Lion you get with a new Mac is only available via the recovery partition on the hard drive and this version of the OS is tied to the hardware.

From this MacWorld article that talks about how the version of iLife you get with a new Mac is a full Mac App Store version you can install on multiple Macs in your house:


  When you reinstall Lion via Lion Recovery, it seems Apple uses information about your Mac's hardware to verify that it has a license for Lion.


Or as this summary of the MacWorld article puts it:


  Unfortunately, as Macworld points out, this trick doesn’t apply to OS X Lion itself — there’s no DVD or thumb drive included with a new Mac, which means the big cat only lives on your new Mac’s recovery partition, which appears to be tied to the hardware itself — meaning you can’t install it on your other Macs without ponying up the $29.99 from the Mac App Store.


Would be nice if you got it for your other Macs for free when you bought a new Mac, but for now it seems like it'll still cost you another $30 to bring all the Macs you own up to the current OS rev.