Why can't I get hot water quickly at my vanity sink?
If you eventually get hot water, it is more likely due to the flow rate of the sink vs. the flow rate of the shower. This determines how fast the cooled water sitting in the pipes is pushed out before the hot water from the heater reaches the faucet. 

In half inch pipe at a typical faucet flow rate of 1.5gpm, it will take 1 minute to clear roughly 18' of pipe. If you have a 3gpm shower head and the same length of pipe it would take half as long. This also assumes that both the shower and sink are being fed by the same size pipe and how the plumbing is routed. If you have a longer pipe run to the sink, it will take longer for hot water from the heater to reach it even at the same flow rate. 3/4" pipe will also take longer at the same flow rate to clear out the same length of pipe (about 12' per minute at 1.5gpm).

As @household Installs pointed out, different types of pipes and different levels of pipe insulation will effect the heat loss of water in the pipes when it isn't flowing.  But you will always have heat loss that will eventually reach ambient temperature, and the amount of time it takes water to move from the heater to the faucet is a constant based on flow rate and capacity.

One solution for the sink would be installing a small on-demand hot water heater underneath and cut down on the amount of water you have to flush from the pipes between the heater and the faucet (and thus time spent doing so).