In writing, anecdotes work best for tangential and secondary information that doesn’t fit into the main narrative or flow. In some cases, especially with humorous anecdotes, they can provide a quick break from the central action and can be good for transitioning or sectioning off parts naturally.