where is the disk capacity stored?

Solution 1:

HDD size in actual "physical" terms of platter/heads is stored in a internal ROM but it is not user-accessible. Modern HDDs (and SSDs) expose an abstraction called LBA (logical block addressing), which basically tell the OS how many user-addressable sectors the disk has.

dd simply reads until EOF (end-of-file), which can either be the end of disk or partition. Copying your entire 1 TB disk to the 2 TB one with dd will end with a maximum of 1 TB partitioned space on you destination disk - ie: the original MBR/GPT does not know anything about the additional space at the end.

Think about a small box put inside a larger one: object inside the smaller box does not "know" anything about the available outer space. At the same time, to use the additional space provided by your 2 TB disk you need to modify the original MBR/GPT creating additional partitions or expanding the last one.

When copying at user level via tools as cp or rsync, you do not need this simply because your 2 TB disk will (hopefully) be already partitioned to use all the available space, with the filesystem sized according.