Often dinghy docks are concrete , old and have sharp bits sticking out, the sort of thing you want to keep your dingy away from.
If you prepare a stern anchor tied onto the dinghy at a fixed length, then as you approach the Dock you can throw it out and set it with your forward motion, stretching out the rode as you approach the dock.
Tie off the Dinghy to the dock with the painter and the tension on the anchor rode will pull the dinghy off the dock and keep it away from harm whilst your away.
This works for sharp docks but also for swell and seastate that might bash your dinghy against the dock.
When you come to leave the departure is also quite easy, you untie your painter, pull in the anchor rode, which will pull you away from the dock and off you go.