Some discount codes are for packages (include UPH tickets) and some are for room only. If you want to buy your UPH tickets when you arrive, be sure the code you use is for room only. TAs can use either code to book your stay (and so can you if you choose to do it yourself).
If you buy UPH tickets (formerly known as Length of Stay Tickets) when you arrive at the resort, you will not get the advance purchase discount on the UPH tickets. However, if you want to drop the arrival and/or departure day, you cannot buy the tickets in advance.
Many people believe plain park hopper tickets or park hopper plus tickets are a better value for their family than are the Ultimate Park Hopper tickets and so they do not get the packages that include UPH tickets. They book with a room only discount code and then either buy their PH or PHP tickets in advance to get that discount. (Some also combine that with their Disney Club discount). Some people purchase tickets via an online ticket broker because many of them offer ticket discounts comparable or better than those available from Disney or the Disney Club.
More than you wanted/needed, right?
Enjoy your trip!