Urine is stored in the bladder. As the bladder becomes full this information is passed via your spinal cord centres to your brain. If you wish to empty your bladder, then the bladder muscle contracts to empty the bladder.
Normally the desire can be modified. One can suppress the desire to pass urine until an appropriate time or place is available. Usually, the bladder empties completely leaving behind insignificant residue. Presence of large volume of urine at the end of voiding happens either because of weak muscles or some obstruction along the outlet