When you create a Unity UI DropDown GameObject, it comes with several components and child GameObjects automatically – Label, Arrow, and Template (as well as ViewPort and Scrollbar, and so on). Dropdowns work by duplicating the Template GameObject for each of the options listed in the Dropdown (Script) component. Both the Text and Sprite image values can be given for each option. The properties of the Template GameObject are used to control the visual style and behavior of the dropdown's thousands of possible settings.
First, you replaced the default options (Option A, Option B, and so on) in the Dropdown (Script) component. You then created a C# script class called DropdownManager that, when attached to your Dropdown and having its PrintNewValue method registered for On Value Changed events, means that we can see the Integer index of the option each time the user changes their choice. Item index values start counting at zero (as with many computing items), so 0 for the first item, 1 for the second item, and so on.
Since the default Dropdown GameObject that was created includes a Scroll Rect (Script) component and a Scrollbar child GameObject, when you reduced the height of Template, you could still scroll through the options. You then removed these items so that your dropdown didn't have a scrolling feature anymore.